Example #1
0
 /**
  * getPageContainerHtmlByName
  *
  * @param Page   $page
  * @param string $name
  *
  * @return string
  */
 protected function getPageContainerHtmlByName(Page $page, $name)
 {
     $revision = $page->getCurrentRevision();
     if (empty($revision)) {
         throw new PageNotFoundException('No revision found for this page.');
     }
     $pluginWrapperRows = $revision->getPluginWrappersByPageContainerName($name);
     $pluginHtml = '';
     if (!empty($pluginWrapperRows) && is_array($pluginWrapperRows)) {
         $pluginHtml = $this->getPluginRowsHtml($pluginWrapperRows);
     }
     return $this->getContainerWrapperHtml($revision->getRevisionId(), $name, $pluginHtml, true);
 }