Last active
December 30, 2016 11:05
-
-
Save potofcoffee/1992b31e67a96bd1122f1022c22590b4 to your computer and use it in GitHub Desktop.
Initializing a Fluid view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// [...] | |
$this->view = new \TYPO3Fluid\Fluid\View\TemplateView(); | |
$paths = $this->view->getTemplatePaths(); | |
$paths->setTemplateRootPaths([ | |
$this->app->getTemplatesPath(), | |
$this->module->getBasePath() . 'Resources/Private/Templates/' | |
]); | |
$paths->setLayoutRootPaths([ | |
$this->app->getLayoutsPath(), | |
$this->module->getBasePath() . 'Resources/Private/Layouts/' | |
]); | |
$paths->setPartialRootPaths([ | |
$this->app->getPartialsPath(), | |
$this->module->getBasePath() . 'Resources/Private/Partials/' | |
]); | |
$this->view->getRenderingContext()->setControllerName($this->getName()); | |
$this->view->render($action); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment