예제 #1
0
 /**
  * This is the default version of the 'unknown' action (triggered when an
  * unknown action is requested in the url command).
  * Your controllers should override this to handle it to suit your needs.
  *
  * @param array $params Url parameters
  * @param string $actionCommand The originally requested action
  * @return View
  */
 public function unknown($params, $actionCommand)
 {
     // Generate the default 404 page
     $view = new View();
     $view->setSource(Config::get('core.dir.views') . '/errorPages/404.tpl');
     // Result
     return $view;
 }
예제 #2
0
 function unknown($params, $actionCommand)
 {
     // Prepare the View
     $view = new View();
     $view->setSource(Config::get('core.dir.views') . '/unknown/unknown.tpl.php');
     // Result
     return $view;
 }
예제 #3
0
 function index($params)
 {
     // Prepare the View
     $view = new View($this);
     $view->setSource(Config::get('core.dir.views') . '/index/index.tpl.php');
     // Result
     return $view;
 }
예제 #4
0
 /**
  * Returns the "Global View", which is the View object that sits above all
  * others in the View hierarchy.
  *
  * @param array
  * @return Buan\View
  */
 public function index($params)
 {
     // Create the View
     $view = new View();
     $view->setSource(Config::get('core.dir.views') . '/global-view/index.tpl.php');
     // Return
     return $view;
 }
예제 #5
0
 /**
  * All core actions should pass their view through this method in order wrap
  * some common elements around it.
  *
  * @param Buan\View
  * @return Buan\View
  */
 private function wrapper($slotView)
 {
     // Prepare the GlobalView
     // We want to use our own template, overriding the application author's
     // own GlobalViewController.
     // Because we can't guarantee that the author is not caching their GlobalView
     // instance, we'll need to store a reference to it in the $slotView.
     // Any subsequent calls to View::getGlobalView() in child slots should be
     // replaced with $GV
     $GV = View::getGlobalView();
     $GV->setSource(Config::get('core.dir.views') . '/global-view/index.tpl.php');
     $GV->html = new HtmlView($GV);
     $slotView->GV = $GV;
     // Create a View for rendering the SystemLog
     $slView = new View();
     $slView->setSource(Config::get('core.dir.views') . '/system-log.tpl.php');
     $GV->attachViewToSlot($slView, 'system-log');
     // Result
     return $slotView;
 }