Prepare the layout.

@return $this
345194
protected function _prepareLayout()
    {
        $this->buttonList->remove('save');
        $this->buttonList->remove('delete');
        $this->buttonList->remove('reset');

        $this->buttonList->add(
            'send',
            [
                'label' => __('Send mail ...'),
                'onclick' => "setLocation('{$this->getUrl('*/*/send', 
                    ['id' => $this->_mail->getId()]
                    )}')",
                'class' => 'task'
            ]
        );

        $this->buttonList->add(
            'send_post',
            [
                'label' => __('Resend mail'),
                'onclick' => "setLocation('{$this->getUrl('*/*/sendPost', 
                [
                    'id' => $this->_mail->getId()
                ])}')",
                'class' => 'task'
            ]
        );

        return parent::_prepareLayout();
    }
188664
public function prepare()
    {
        // The date format method to use with Carbon to convert the dates
        $dateFormatMethod = 'to' . strtolower($this->format) . 'String';

        if (null !== $this->pubDate) {
            $this->pubDate = Carbon::parse($this->pubDate)->{$dateFormatMethod}();
        }

        if (null !== $this->updated) {
            $this->updated = Carbon::parse($this->updated)->{$dateFormatMethod}();
        }

        $this->title = strip_tags($this->title);

        $this->autoFill();
    }
1336189
public function prepend()
    {
        $this->importNodes(\func_get_args(), function ($node, $imported_node) {
            $node->insertBefore($imported_node, $node->childNodes->item(0));
        });

        return $this;
    }
835543
public function setLayout($layout)
    {
        $extensions = ['.php', '.phtml', '.html', '.tpl'];

        if (isset($this->presets[ 'extensions' ])) {
            array_unshift($partialsExtensions, $this->presets[ 'extension' ]);
        } elseif (isset($this->presets[ 'extension' ])) {
            array_unshift($extensions, $this->presets[ 'extension' ]);
        }

        foreach ($extensions as $extension) {
            $extension = trim($extension, '.');

            if ($layout === 'theme') {
                $layoutFilePath = $this->getRealPath() . 'theme.' . $extension;
            } else {
                $layoutFilePath = $this->getRealPath() . 'layouts' . DIRECTORY_SEPARATOR . dash($layout) . DIRECTORY_SEPARATOR . 'layout.' . $extension;
            }

            if (is_file($layoutFilePath)) {
                $this->layout = new Theme\Layout($layoutFilePath);
                //$this->loadLayout();
                break;
            }
        }

        return $this;
    }
785010
public function setLayout($layout){
        $this->_layout = $layout;
        if(isset($this->_view[0])) {
            $this->resetViews();
        }
        $this->addView($layout);
    }
399170
protected function buildLayoutFile()
    {
        $stubFiles = $this->getStub('layout');

        $stub = $this->files->get($stubFiles);

        $this->replaceStubFileData($stub);

        return $stub;
    }
29103
protected function setupLayout($layout = null)
    {
        $this->layout = !is_null($layout) ? $layout : $this->layout;
        if ($this->layout && is_string($this->layout) && view()->exists($this->layout)) {
            $this->layout = view($this->layout);
        }
    }
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');
        }
    }
818655
public function doBefore() {
        if(count($this->_controller->getViews()) == 0) {
            $l = FLayout::create('main_layout.php', $this->_app);
            $this->_controller->setLayout($l);
        }
    }
48084
protected function loadLayout()
    {
        $this->hook->trigger(self::HOOK_LOAD_LAYOUT_BEFORE);

        if ($this->config->get('parable.layout.header')) {
            $this->response->setHeaderContent(
                $this->view->partial($this->config->get('parable.layout.header'))
            );
        }
        if ($this->config->get('parable.layout.footer')) {
            $this->response->setFooterContent(
                $this->view->partial($this->config->get('parable.layout.footer'))
            );
        }

        $this->hook->trigger(self::HOOK_LOAD_LAYOUT_AFTER);
        return $this;
    }
1349061
protected function _prepareLayout()
    {
        $this->removeButton('add');
        $this->_addButton('add_new', array(
            'label' => $this->__('Generate Schedule'),
            'onclick' => "setLocation('{$this->getUrl('*/*/generateSchedule')}')",
        ));
        $this->_addButton('configure', array(
            'label' => $this->__('Cron Configuration'),
            'onclick' => "setLocation('{$this->getUrl('adminhtml/system_config/edit', array('section' => 'system'))}#system_cron')",
        ));
        return parent::_prepareLayout();
    }
843509
public function load()
    {
        if ($this->getPresets()->offsetExists('assets')) {
            presenter()->assets->autoload($this->getPresets()->offsetGet('assets'));
        }

        presenter()->assets->loadCss('theme');
        presenter()->assets->loadJs('theme');

        // Autoload default theme layout
        $this->loadLayout();

        return $this;
    }
969211
public function setLayout($layout, $layoutModule = null)
    {
        $this->layout = $layout;
        $this->layoutModule = $layoutModule;

        return $this;
    }
414871
protected function setupLayout()
    {
        if ( ! is_null($this->layout))
        {
            $this->layout = View::make($this->layout);
        }
    }
1308949
public function setLayout(\Haven\CmsBundle\Entity\Layout $layout = null)
    {
        $this->layout = $layout;
    
        return $this;
    }
656064
protected function prepare()
    {
        $this
            ->getSession()
            ->getConnection()
            ->sendPrepareQuery(
                $this->getClientIdentifier(),
                $this->orderParameters($this->sql)
            );
        $this->is_prepared = true;

        return $this;
    }
67994
protected function prepare()
    {
        /** @var CollectionView $collection */
        $collection = $this->getComponent('collection_view');
        $collection->setData($this->getDataProvider());
        if ($collection->getDataInjector() === null) {
            $collection->setDataInjector($this->makeDataInjector());
        }
        $this->applyOperations();
        $this->hideSubmitButtonIfNotUsed();
    }