public function testBuild() { $this->model->setBuilder($this->builder); $this->builder->expects($this->once())->method('build')->will( $this->returnValue('Magento\Framework\View\LayoutInterface') ); $this->model->publicBuild(); }
/** * {@inheritdoc} */ public function publicBuild() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'publicBuild'); if (!$pluginInfo) { return parent::publicBuild(); } else { return $this->___callPlugins('publicBuild', func_get_args(), $pluginInfo); } }
/** * @param ResponseInterface $response * @return $this */ protected function render(ResponseInterface $response) { $this->pageConfig->publicBuild(); if ($this->getPageLayout()) { $config = $this->getConfig(); $this->addDefaultBodyClasses(); $addBlock = $this->getLayout()->getBlock('head.additional'); // todo $requireJs = $this->getLayout()->getBlock('require.js'); $this->assign(['requireJs' => $requireJs ? $requireJs->toHtml() : null, 'headContent' => $this->pageConfigRenderer->renderHeadContent(), 'headAdditional' => $addBlock ? $addBlock->toHtml() : null, 'htmlAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_HTML), 'headAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_HEAD), 'bodyAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_BODY), 'loaderIcon' => $this->getViewFileUrl('images/loader-2.gif')]); $output = $this->getLayout()->getOutput(); $this->assign('layoutContent', $output); $output = $this->renderPage(); $this->translateInline->processResponseBody($output); $response->appendBody($output); } else { parent::render($response); } return $this; }