Setup the layout used by the controller.

@return void
769540
public function setupLayout()
    {
        if (isset($this->layout) && !is_null($this->layout)) {
            $data = array();
            // Enter here data that have to be accessible everywhere
            $this->layout = view($this->layout, $data);
        }
    }
131539
protected function _layoutDefault()
    {
        $story = $this->_state->getItem();

        $helper = $this->getTemplate()->getHelper('parser');

        $data = $helper->parse($story, $this->actor);

        $data['subject'] = $story->subject;

        $data['timestamp'] = $story->creationTime;

        $data['story'] = $story;

        $data['entity'] = $story;

        $viewer = get_viewer();

        $commands = $this->getTemplate()->renderHelper('toolbar.commands', 'list');
        $commands->offsetUnset('comment');

        $this->set($data);
    }
537479
protected function _setTitle()
    {
        if (empty($this->viewVars['title_for_layout'])) {
            $title = option('site_title');
            $this->assign('title', $title);
            $this->set('title_for_layout', $title);
        } else {
            $this->assign('title', $this->viewVars['title_for_layout']);
        }
    }
712878
public function setViewLayout($view)
    {
        $this->layout         = $this->viewLayout->change($view);
        $this->layout->layout = $this->viewPath->setUp($this->layout->layout, null);
    }
1300580
public function setLayout($layout) {
		if (!$layout) {
			$this->request->getSession()->delete('Setup.layout');
			return;
		}
		$this->request->getSession()->write('Setup.layout', $layout);
	}
785010
public function setLayout($layout){
        $this->_layout = $layout;
        if(isset($this->_view[0])) {
            $this->resetViews();
        }
        $this->addView($layout);
    }
379517
public function setUp()
    {
        if ($this->filesystem->exists($this->outputDir) === false) {
            return;
        }

        $finder = new Finder();
        $finder->in($this->outputDir)
            ->depth('== 0');

        $this->filesystem->remove($finder);
    }
1201242
protected function _setDescription()
    {
        if (empty($this->viewVars['description_for_layout'])) {
            $description = option('site_description');
            $this->assign('description', $description);
            $this->set('description_for_layout', $description);
            $this->append('meta', $this->Html->meta('description', $description));
        } else {
            $this->assign('description', $this->viewVars['description_for_layout']);
        }
    }
295159
private function init()
    {
        // Set the layout from the Config file
        $this->layout = View::make(config('decoy.core.layout'));

        // Store the controller class for routing
        $this->controller = get_class($this);

        // Get the controller name
        $controller_name = $this->controllerName($this->controller);

        // Make a default title based on the controller name
        if (empty($this->title)) {
            $this->title = $this->title($controller_name);
        }

        // Figure out what the show view should be.  This is the path to the show
        // view file.  Such as 'admin.news.edit'
        if (empty($this->show_view)) {
            $this->show_view = $this->detailPath($this->controller);
        }

        // Try to suss out the model by singularizing the controller
        if (empty($this->model)) {
            $this->model = $this->model($this->controller);
            if (!class_exists($this->model)) {
                $this->model = null;
            }
        }

        // If the input contains info on the parent, immediately instantiate
        // the parent instance.  These are populated by some AJAX calls like
        // autocomplete on a many to many and the attach method.
        if (($parent_id = request('parent_id'))
            && ($parent_controller = request('parent_controller'))) {
            $parent_model_class = $this->model($parent_controller);
            $this->parent($parent_model_class::findOrFail($parent_id));
        }
    }
273766
protected function _setLayout(Controller &$controller) {
		$isModal = $controller->request->is('modal');
		$isPopup = $controller->request->is('popup');
		$isSSE = $controller->request->is('sse');
		$isPrint = $controller->request->is('print');
		if ($isModal || $isPopup || $isSSE) {
			$controller->layout = 'CakeTheme.default';
		} elseif ($isPrint) {
			$controller->viewPath = mb_ereg_replace(DS . 'prt', '', $controller->viewPath);
			$controller->response->type('html');
		}
	}
99294
protected function _layoutEdit()
    {
        $config = new AnConfig(array(
            'date' => $this->item->expiresOn,
        ));

        $this->set(array(
            'expiresOn' => new AnDate($config),
        ));
    }
304590
protected function setupStateProvider()
    {
        $interfaces = class_implements($this);
        $this->layoutManager->initInterfaces($interfaces, get_class($this));

    }
724168
private function setupDefaultConfigs()
    {
        $this->setLayout();
        $this->setSummary();

        if (!$this->isEmpty()) {
            $this->setActionBar();
        }

        $this->showOnEmpty = false;
    }
702147
protected function _prepareLayout()
    {
        $menu = [
            __d('installer', 'Welcome') => [
                'url' => ['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'language'],
                'active' => ($this->request->action === 'language')
            ],
            __d('installer', 'System Requirements') => [
                'url' => ['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'requirements'],
                'active' => ($this->request->action === 'requirements')
            ],
            __d('installer', 'License Agreement') => [
                'url' => ['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'license'],
                'active' => ($this->request->action === 'license')
            ],
            __d('installer', 'Database Setup') => [
                'url' => ['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'database'],
                'active' => ($this->request->action === 'database')
            ],
            __d('installer', 'Your Account') => [
                'url' => ['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'account'],
                'active' => ($this->request->action === 'account')
            ],
            __d('installer', 'Finish') => [
                'url' => ['plugin' => 'Installer', 'controller' => 'startup', 'action' => 'finish'],
                'active' => ($this->request->action === 'finish')
            ],
        ];

        $this->set('menu', $menu);
    }
1018834
protected function setup_components() {
		$this->load_components();

		$components = $this->get_components();
		$this->set_component_parents( $components );
		/** @var \ComposePress\Core\Abstracts\Component[] $components */
		foreach ( $components as $component ) {
			if ( method_exists( $component, 'init' ) ) {
				$component->init();
			}
		}
	}
1252288
public function prepareController()
    {
        // Do the layout switch here, when view is set the layout can still be changed, but
        // Bootstrap can no longer be switched on/off
        if ($this instanceof \Gems_Project_Layout_MultiLayoutInterface) {
            $this->layoutSwitch();
        }

        if ($this->useBootstrap) {
            $bootstrap = \MUtil_Bootstrap::bootstrap(array('fontawesome' => true));
            \MUtil_Bootstrap::enableView($this->view);
        }

        if (\MUtil_Console::isConsole()) {
            /* @var $layout \Zend_Layout */
            $layout = $this->view->layout();

            $layout->setLayoutPath(GEMS_LIBRARY_DIR . "/layouts/scripts");
            $layout->setLayout('cli');
        }
    }
842370
public function layout_Content()
    {
        $page = str_replace('/', '_', $this->page);

        if (method_exists($this, $pagefunc = 'page_'.$page)) {
            $p = $this->add('Page', $this->page, 'Content');
            $this->$pagefunc($p);
        } else {
            $this->app->locate('page', str_replace('_', '/', $this->page).'.php');
            $this->add('page_'.$page, $page, 'Content');
            //throw new BaseException("No such page: ".$this->page);
        }
    }