Exemplo n.º 1
0
 /**
  * @param mixed              $content
  * @param string             $websiteId
  * @param string             $templateId
  * @param string             $mode
  * @param array              $globalContent
  * @param \Cms\Data\Template $template
  * @param null               $codeType
  */
 public function renderTemplateContent($content, $websiteId, $templateId, $mode, $globalContent, $template, $codeType = null)
 {
     // Check page content and stop/break nicely
     $content = $this->convertContentToArray($content);
     if (empty($content)) {
         return;
     }
     // create item meta data simulation
     $currentItemInfo = array('id' => $templateId, 'websiteId' => $websiteId, 'name' => $template->getName(), 'pageType' => $template->getPageType(), 'globalContent' => $globalContent);
     $this->renderWithNewRenderer($content, $websiteId, $templateId, $mode, $currentItemInfo, $codeType, true);
 }
Exemplo n.º 2
0
 /**
  * @param \Cms\Data\Template $data
  */
 protected function setValuesFromData(TemplateData $data)
 {
     $this->setId($data->getId());
     $this->setWebsiteId($data->getWebsiteId());
     $this->setName($data->getName());
     $this->setContent($data->getContent());
     $this->setPageType($data->getPageType());
     $this->setScreenshot();
 }