Esempio n. 1
0
 public function renderList()
 {
     $tpl = static::loadView('ui.list.tpl');
     $tpl->title = 'Welcome to Edge';
     $tpl->list = ["one", "two", "three"];
     return parent::render($tpl, ['title' => 'Edge MVC']);
 }
Esempio n. 2
0
 /**
  * Render the layout with the contents
  * of Application/Views/ui.index.tpl
  * @return mixed|string
  */
 public function index()
 {
     $tpl = static::loadView('ui.index.tpl');
     $tpl->title = 'Welcome to Edge';
     return parent::render($tpl, ['title' => 'Edge MVC']);
 }
Esempio n. 3
0
 protected static function getFilters(\Edge\Controllers\BaseController $instance)
 {
     $filters = $instance->filters();
     if (count($filters) > 0) {
         $filterInstances = array();
         foreach ($filters as $filter) {
             $class = array_shift($filter);
             if (count($filter) > 0) {
                 $instance = new $class($filter);
             } else {
                 $instance = new $class();
             }
             $filterInstances[] = $instance;
         }
         return $filterInstances;
     }
     return $filters;
 }