/** * Search a view file in the current file system * * @param string $name The file path to search * @return string The path of the file found */ public function getTemplate($name) { return FrontController::get('template_engine')->getTemplate($name); }
/** * Search a view file in the current file system * * @param string $name The file path to search * @return string The path of the file found */ public function getTemplate($name) { return FrontController::get('locator')->locateTemplate($name); }
public function formAction() { $content = FrontController::get('template_engine')->renderTemplate(self::$views_dir . 'form.php'); return FrontController::get('template_engine')->renderDefault($content); }
/** * @param string $name * @param string $view * @param array $params * @return $this */ public function setChild($name, $view, array $params = array()) { $this->_children[$name] = FrontController::get('template_engine')->getNewTemplate($view, $params); return $this; }
/** * Get the default environment vars to load in views and calling controller's actions * @return array */ public static function getDefaultEnvParameters() { return array('app' => FrontController::getInstance(), 'template_engine' => FrontController::get('template_engine'), 'request' => FrontController::get('request'), 'response' => FrontController::get('response'), 'data' => FrontController::get('request')->getArguments()); }