public function _prepareLayout() { $brand = $this->getBrand(); $pageMainTitle = $this->getLayout()->getBlock('page.main.title'); if ($pageMainTitle) { $pageMainTitle->setPageTitle($brand->getName()); } $this->pageConfig->getTitle()->set($brand->getTitle()); $this->pageConfig->setKeywords($brand->getTitle()); $this->pageConfig->setDescription($brand->getTitle()); return parent::_prepareLayout(); }
/** * Prepare global layout * * @return $this */ protected function _prepareLayout() { $page = $this->getPage(); $this->_addBreadcrumbs($page); $this->pageConfig->addBodyClass('cms-' . $page->getIdentifier()); $this->pageConfig->getTitle()->set($page->getTitle()); $this->pageConfig->setKeywords($page->getMetaKeywords()); $this->pageConfig->setDescription($page->getMetaDescription()); $pageMainTitle = $this->getLayout()->getBlock('page.main.title'); if ($pageMainTitle) { // Setting empty page title if content heading is absent $cmsTitle = $page->getContentHeading() ?: ' '; $pageMainTitle->setPageTitle($this->escapeHtml($cmsTitle)); } return parent::_prepareLayout(); }
public function testDescription() { $description = 'test_description'; $this->model->setDescription($description); $this->assertEquals($description, $this->model->getDescription()); }
/** * {@inheritdoc} */ public function setDescription($description) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setDescription'); if (!$pluginInfo) { return parent::setDescription($description); } else { return $this->___callPlugins('setDescription', func_get_args(), $pluginInfo); } }