Example #1
0
 /**
  * Sets the layout
  *
  * @param  string $layout
  * @param  string $view
  * @return self
  */
 public function setLayout($layout)
 {
     $project = ProjectManager::getActiveProject();
     if ($project && $layout != EXCEPTION_LAYOUT) {
         $path = $project->getLayoutPath();
     } else {
         $path = ProjectManager::getDefaultProject()->getLayoutPath();
     }
     // Set layout
     $this->layout = new Layout($layout, $path);
     // Update view if it was set
     if ($this->view) {
         $this->view->update();
     }
     return $this;
 }