Shows a layout.

@return \Zend\Stdlib\ResponseInterface|\Zend\View\Model\ViewModel
490212
public function indexAction()
    {
        $service = $this->getLayoutService();
        try {
            $theme = $service->getTheme(
                $this->params()->fromRoute('theme')
            );
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/layout')
                ->setStatusCode(303);
        }

        $event = $this->getRequest()->getPost('suboperation');
        if (! empty($event)) {
            $events = $this->getEventManager();
            $params = $this->request->getPost();
            $params['theme'] = $theme->getName();
            $results = $events->trigger($event, $this, $params);
            foreach ($results as $result) {
                if ($result instanceof Response) {
                    return $result;
                }
            }
        }

        $view = new ViewModel([
            'controlSet' => $service->getControlSet(),
            'regions' => $service->getRegions($theme->getName()),
            'theme' => $theme,
        ]);

        $flashMessenger = $this->flashMessenger();
        if ($flashMessenger->hasMessages()) {
            $view->messages = $flashMessenger->getMessages();
        }

        return $view;
    }
576699
public function getLayoutPath()
    {
        $ref = new \ReflectionClass($this);
        return dirname(dirname($ref->getFileName())) . '/views/layouts/' . $this->layout . '.php';
    }
1305437
protected function render()
    {
        if (null === $this->active) {
            $this->setActive(key($this->tabs));
        }

        $tabs       = new ViewModel;
        $tabs->tabs = $this->tabs;

        $tabs->setTemplate('sxbootstrap/tabs/tabs');

        return $this->getView()->render($tabs);
    }
931975
protected function _render()
    {
        $viewClass = $this->viewRender();
        $viewClass = App::className($viewClass, 'View', $viewClass == 'View' ? '' : 'View');

        $viewVars = [
            'theme',
            'layoutPath',
            'templatePath',
            'template',
            'layout',
            'helpers',
            'viewVars',
        ];
        $viewOptions = [];
        foreach ($viewVars as $var) {
            $prop = '_' . $var;
            $viewOptions[$var] = $this->{$prop};
        }

        $request = Router::getRequest(true);
        if (!$request) {
            $request = ServerRequestFactory::fromGlobals();
        }

        $View = new $viewClass(
            $request,
            null,
            null,
            $viewOptions
        );

        return $View->render();
    }
843386
public function viewAction()
    {
        $model = $this->loadModel();
        if (!$model->getId()) {
            $this->_forward('noroute');
            return;
        }

        $this->loadLayout();
        $this->renderLayout();
    }
1009663
public function index()
    {
        return $this->core->api()->response(
            [
                'layout' => $this->transformPresencesForApi($this->menu->getMenuLayout()),
            ]
        );
    }
875867
public function display() {
		$path = func_get_args();

		$count = count($path);
		if (!$count) {
			return $this->redirect('/');
		}
		$page = $subpage = $title_for_layout = null;
        if (!empty($path[0])) {
			$page = $path[0];
		}
		if (!empty($path[1])) {
			$subpage = $path[1];
		}
		if (!empty($path[$count - 1])) {
			$title_for_layout = Inflector::humanize($path[$count - 1]);
		}
        $this->set(compact('page', 'subpage', 'title_for_layout'));
		try {

			$this->render(implode('/', $path));
		} catch (MissingViewException $e) {
			if (Configure::read('debug')) {
				throw $e;
			}
			throw new NotFoundException();
		}
	}
1191131
public function render()
    {
        $data = $this->grid->getViewData();
        $data['column'] = $this->column;
        $data['filter'] = $this;
        $data['label'] = $this->config->getLabel();
        return View::make(
            $this->getTemplate(),
            $data
        )->render();
    }
266541
public function listAction()
    {
        $params     = $this->params();
        $request    = $this->getRequest();
        $bodyOnly   = $request->isXmlHttpRequest();
        $page       = $params->fromRoute( 'page',
            $request->getPost( 'page',
                $request->getQuery( 'page', 1 )
            )
        );

        $view = new ViewModel( array(
            'paginator' => $this->getPaginator(),
            'page'      => ( (int) $page ) ?: 1,
            'format'    => $bodyOnly,
        ) );

        if ( $bodyOnly )
        {
            $view->setTerminal( true );
        }

        return $view;
    }
542726
public function getLayoutID(){
        $out = '';
        extract($this->request->params);  
        
        if ($prefix) {
            $out  .= ucfirst($prefix).'-' ; 
        }

        if ($plugin) {
            $out  .= ucfirst($plugin) ; 
        }

        $out .= ucfirst($controller);
        $out .= ucfirst($action);
        
        return  $out;
    }
1175259
public function indexAction(){
		$configForm = $this->getForm();
		$configForm->setData($this->getConfig());
		
		$view = new ViewModel(array('title' => $this->getEditTitle(), 'configForm' => $configForm));
		$view->setTemplate('xelax-site-config/site-config/index.phtml');
		return $view;
	}
435407
protected function getLayout()
    {
        $this->setData('homeUrl', $this->getServiceManager()->get(DefaultUrlService::SERVICE_ID)->getUrl('ProctoringHome'));
        $this->setData('logout', $this->getServiceManager()->get(DefaultUrlService::SERVICE_ID)->getUrl('ProctoringLogout'));
        return ['layout.tpl', 'taoProctoring'];
    }
1114598
public function getViewModel() {
		if ($this->useCache) {
			$viewModel = $this->recacheAgent->getViewModel('show', $this->entityNamespace, $this->entityId);
			if ($viewModel) {
				return $viewModel;
			}
		}
		
		$this->viewModel = new ViewModel();
		
		$dataToDisplay = $this->getEntityData($this->entityId);
		$this->viewModel->setVariable('dataToDisplay', $dataToDisplay);
		
		$this->setupTemplate();
		$this->setupTitle();
		
		if ($this->useCache) {
			$this->recacheAgent->storeViewModel($this->viewModel, 'show', $this->entityNamespace, $this->entityId);
		}
		
		return $this->viewModel;
	}
730028
public function getLayout()
    {
        $page = $this->CurrentPage;
        $customTemplate = $this->Style ? '_'.$this->Style : '';
        $pageType = $page->ClassName ? '_'.$page->ClassName : '';
        $className = $this->ClassName;
        $templates = array(
            $className.$pageType.$customTemplate,
            $className.$customTemplate,
            $className.$pageType,
            $className,
            'DefaultPlacement'
        );
        $this->extend('updateLayout', $templates);
        return $this->renderWith($templates, $this->getController());
    }
1027774
public function indexAction()
    {
        if (!$this->rcmUserService->isAllowed(ResourceName::RESOURCE_SITES, 'admin')) {
            $this->getResponse()->setStatusCode(Response::STATUS_CODE_401);

            return $this->getResponse();
        }

        $this->layout()->setTemplate('layout/blank');

        $view = new ViewModel();
        $view->setVariable(
            'siteSettingsSectionDefinitions',
            $this->getSettingsSectionDefinitions->__invoke()
        );

        return $view;
    }
205555
public function renderParamsWrap()
    {
        $view = new \Zend\View\Model\ViewModel();

        $view->setTemplate('default-params');
        $view->setVariable('column', $this->getTable()->getParamAdapter()->getColumn());
        $view->setVariable('itemCountPerPage', $this->getTable()->getParamAdapter()->getItemCountPerPage());
        $view->setVariable('order', $this->getTable()->getParamAdapter()->getOrder());
        $view->setVariable('page', $this->getTable()->getParamAdapter()->getPage());
        $view->setVariable('quickSearch', $this->getTable()->getParamAdapter()->getQuickSearch());
        $view->setVariable('rowAction', $this->getTable()->getOptions()->getRowAction());

        return $this->getRenderer()->render($view);
    }
1076011
final protected function getLayoutProvider()
    {
        $layout = LayoutProvider::getProvider();
        $layout->generateValueEvent->attachHandler(function ($elementName) {
            if (isset($this->leaves[$elementName])) {
                return $this->leaves[$elementName];
            }

            return null;
        });

        return $layout;
    }