Ejemplo n.º 1
0
 public function __toString()
 {
     TemplateEngine::appendPath(Ntentan::getFilePath('lib/views/helpers/lists/templates'));
     $this->rowTemplate = $this->rowTemplate == null ? 'row.tpl.php' : $this->rowTemplate;
     $this->defaultCellTemplate = $this->defaultCellTemplate == null ? 'default_cell.tpl.php' : $this->defaultCellTemplate;
     return TemplateEngine::render('list.tpl.php', array("headers" => $this->headers, "data" => $this->data, "row_template" => $this->rowTemplate, "cell_templates" => $this->cellTemplates, "default_cell_template" => $this->defaultCellTemplate, "variables" => $this->variables, "has_headers" => $this->hasHeaders));
 }
Ejemplo n.º 2
0
 public function login()
 {
     TemplateEngine::appendPath(Ntentan::getFilePath('lib/controllers/components/auth/views'));
     if (isset($_REQUEST["username"]) && isset($_REQUEST["password"])) {
         return $this->authLocalPassword($_REQUEST["username"], $_REQUEST["password"]);
     } else {
         return false;
     }
 }
Ejemplo n.º 3
0
 public function init()
 {
     parent::init();
     $this->addComponent('wyf.model_controller');
     $wyf = $this->wyfModelControllerComponent;
     $wyf->listFields = array('firstname', 'lastname', 'username');
     $wyf->addOperation('Assign Roles', 'assign_roles');
     TemplateEngine::appendPath(Ntentan::getPluginPath('wyf/views/system_module'));
 }
Ejemplo n.º 4
0
 public function init()
 {
     parent::init();
     $this->addComponent('wyf.model_controller');
     $wyf = $this->wyfModelControllerComponent;
     $wyf->addOperation('Set Permissions', 'set_permissions');
     $wyf->listFields = array('name', 'description');
     TemplateEngine::appendPath(Ntentan::getPluginPath('wyf/views/system_module'));
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     Ntentan::addIncludePath(Ntentan::getFilePath("lib/views/helpers/forms/api"));
     Ntentan::addIncludePath(Ntentan::getFilePath("lib/views/helpers/forms/api/renderers"));
     \ntentan\views\template_engines\TemplateEngine::appendPath(Ntentan::getFilePath("lib/views/helpers/forms/views"));
 }
Ejemplo n.º 6
0
 public function init()
 {
     TemplateEngine::appendPath(Ntentan::getPluginPath('wyf/views/report_controller'));
 }
Ejemplo n.º 7
0
 public function init()
 {
     TemplateEngine::appendPath(Ntentan::getFilePath('lib/controllers/components/admin/views/layouts'));
     TemplateEngine::appendPath(Ntentan::getFilePath('lib/controllers/components/admin/views/templates'));
 }
Ejemplo n.º 8
0
 public function __toString()
 {
     $cacheKey = $this->getCacheKey();
     if (Cache::exists($cacheKey) && Ntentan::$debug === false) {
         $output = Cache::get($cacheKey);
     } else {
         $this->execute();
         $this->preRender();
         TemplateEngine::appendPath($this->filePath);
         if ($this->template == "") {
             $this->template = ($this->plugin == '' ? '' : "{$this->plugin}_") . "{$this->name}_widget.tpl.php";
         }
         try {
             $output = TemplateEngine::render($this->template, $this->data);
         } catch (Exception $e) {
             die('Template not Found!');
         }
         $this->postRender();
         Cache::add($cacheKey, $output, $this->cacheLifetime);
     }
     return $output;
 }