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']); }
/** * 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']); }
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; }