Created
March 16, 2011 13:10
-
-
Save pniederlag/872466 to your computer and use it in GitHub Desktop.
substitute fluid with another templatin engine
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 | |
class Tx_Pnphptal_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controller_ActionController { | |
/** | |
* Prepares a view for the current action and stores it in $this->view. | |
* By default, this method tries to locate a view with a name matching | |
* the current action. | |
* | |
* @return void | |
* @api | |
*/ | |
protected function resolveView() { | |
// fb('overriding resolveView'); | |
$view = $this->objectManager->getObject('Tx_Pnphptal_View_TemplateView'); | |
$controllerContext = $this->buildControllerContext(); | |
$view->setControllerContext($controllerContext); | |
// Template Path Override | |
$extbaseFrameworkConfiguration = Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration(); | |
if (isset($extbaseFrameworkConfiguration['view']['templateRootPath']) && strlen($extbaseFrameworkConfiguration['view']['templateRootPath']) > 0) { | |
$view->setTemplateRootPath(t3lib_div::getFileAbsFileName($extbaseFrameworkConfiguration['view']['templateRootPath'])); | |
} | |
if ($view->hasTemplate() === FALSE) { | |
$viewObjectName = $this->resolveViewObjectName(); | |
if (class_exists($viewObjectName) === FALSE) $viewObjectName = 'Tx_Extbase_MVC_View_EmptyView'; | |
$view = $this->objectManager->getObject($viewObjectName); | |
$view->setControllerContext($controllerContext); | |
} | |
if (method_exists($view, 'injectSettings')) { | |
$view->injectSettings($this->settings); | |
} | |
$view->initializeView(); // In FLOW3, solved through Object Lifecycle methods, we need to call it explicitely | |
$view->assign('settings', $this->settings); // same with settings injection. | |
return $view; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment