I had this piece of code in a module developed for some previous version of Drupal 8.
protected function getOutput() {
$content = $this->buildContent();
//print_r($content);
$page = array(
'#theme' => 'html',
'#page_object' => new Html(render($content)),
);
$rendered_page = render($page);
return $rendered_page;
}
Now, in the present beta release, it shows this error:
Fatal error: Class 'Drupal\hardcopy\Plugin\Html' not found in C:\xampp\htdocs\drupalbeta7\modules\custom\hardcopy\src\Plugin\HardcopyFormatBase.php on line 175
Can someone tell me how to pass the HTML of the whole page in the response object?