예제 #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));
 }
예제 #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;
     }
 }
예제 #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'));
 }
예제 #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'));
 }
예제 #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"));
 }
예제 #6
0
 public function init()
 {
     TemplateEngine::appendPath(Ntentan::getPluginPath('wyf/views/report_controller'));
 }
예제 #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'));
 }
예제 #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;
 }