예제 #1
0
 /**
  * Rendu d'un template en utilisant les éventuelles variables pré-assignées.
  *
  * @see sfTemplateEngine::render()
  */
 public function render($sTemplateFile, array $aVars = array())
 {
     if (!empty($aVars)) {
         $this->assign($aVars);
     }
     return parent::render($sTemplateFile, $this->aAssignedVars);
 }
 public function display($template, $return = false)
 {
     $loader = new sfTemplateLoaderFilesystem($this->getTemplateLoaderPathMasks());
     $engine = new sfTemplateEngine($loader);
     $engine->setHelperSet(new sfTemplateHelperSet($this->getTemplateHelperSets()));
     // var_dump($this->templateParameters);exit;
     $result = $engine->render($template, $this->templateParameters);
     if ($return) {
         return $result;
     }
     echo $result;
 }