public static function login($data, $main = true) { $login = new \Work\Views\Login($data); if ($main) { $main = new \Frame\Views\Main(); $main->layout($login); return $main->render(); } else { return $login->render(); } }
public static function start() { $main = new \Frame\Views\Main(); $panels = array(); $panels[] = array(new \Work\Views\Header()); if (\Frame\Libraries\User::hasRole('testing')) { $panels[] = array(new \Work\Views\TestMenu()); } $panels[] = array('middle' => new \Work\Views\Middle()); //$login = new \Work\Views\Login; $panels[] = array(new \Work\Views\Footer()); $layout = new \Frame\Views\Layout($panels); $main->layout($layout); return $main->render(); }