Example #1
0
 public function includeTemplate($path, $params = array(), $elements = array(), $theme = null)
 {
     // Include template with parameter options and return parsed output
     $view = new View($this->controller, $this->model, $this);
     $view->setTemplate($path, $theme);
     $view->assignVars($this->vars);
     $view->assignParams($params);
     $view->setElements($elements);
     return $view->createOutput();
 }
 public static function createInput($type, $name, $value, array $options = array())
 {
     // Print single input directly instead of gathering them in the instance first
     $params = array_merge($options, array("type" => $type, "name" => $name, "value" => self::escape($value)));
     $input = new View();
     $input->setTemplate("element/form/input/" . $type);
     $input->assignParams($params);
     return $input->createOutput();
 }