Commit 5cb3ed8b authored by Josef Glatz's avatar Josef Glatz
Browse files

[BUGFIX] Fix page renderer instantiation

parent 0e6eba60
......@@ -36,20 +36,10 @@ class AbstractViewHelper extends AbstractBackendViewHelper {
/**
* Returns an instance of the page renderer
*
* @deprecated Implement the following migration if the extension just needs to support > 7.5.
* @return PageRenderer
*/
public function getPageRenderer() {
// Migration
// return $this->objectManager->get(\TYPO3\CMS\Core\Page\PageRenderer::class);
if (TYPO3_MODE === 'BE') {
$pageRenderer = $this->getDocInstance()->getPageRenderer();
} else {
/** @noinspection PhpUndefinedMethodInspection */
$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
}
return $pageRenderer;
return $this->objectManager->get(\TYPO3\CMS\Core\Page\PageRenderer::class);
}
/**
......@@ -70,4 +60,4 @@ class AbstractViewHelper extends AbstractBackendViewHelper {
}
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment