Пример #1
0
 /**
  * Copies the content from the other page given.
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page
  */
 public function getFallbackContentFrom($page)
 {
     $this->isVirtual = true;
     $this->content = $page->getContent();
     $this->module = $page->getModule();
     $this->cmd = $page->getCmd();
     $this->skin = $page->getSkin();
     $this->customContent = $page->getCustomContent();
     $this->cssName = $page->getCssName();
     $this->cssNavName = $page->getCssNavName();
     $this->type = $page->getType();
     $this->target = $page->getTarget();
 }
Пример #2
0
 /**
  * Copies the content from the other page given.
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page
  * @param boolean $includeThemeOptions (optional) Wheter to adopt theme options as well (default false)
  */
 public function setContentOf($page, $includeThemeOptions = false)
 {
     $this->isVirtual = true;
     $this->content = $page->getContent();
     $this->module = $page->getModule();
     $this->cmd = $page->getCmd();
     if ($includeThemeOptions) {
         $this->skin = $page->getSkin();
         $this->customContent = $page->getCustomContent();
         $this->applicationTemplate = $page->getApplicationTemplate();
         $this->cssName = $page->getCssName();
     }
     $this->cssNavName = $page->getCssNavName();
     $this->type = $page->getType();
     $this->target = $page->getTarget();
 }
Пример #3
0
 /**
  * Returns the type of the page as string.
  * 
  * @param   \Cx\Core\ContentManager\Model\Entity\Page  $page
  * @return  string                         $type
  */
 public function getTypeByPage($page)
 {
     global $_CORELANG;
     switch ($page->getType()) {
         case \Cx\Core\ContentManager\Model\Entity\Page::TYPE_REDIRECT:
             $criteria = array('nodeIdShadowed' => $page->getTargetNodeId(), 'lang' => $page->getLang());
             $targetPage = $this->findOneBy($criteria);
             $targetTitle = $targetPage ? $targetPage->getTitle() : $page->getTarget();
             $type = $_CORELANG['TXT_CORE_CM_TYPE_REDIRECT'] . ': ';
             $type .= $targetTitle;
             break;
         case \Cx\Core\ContentManager\Model\Entity\Page::TYPE_APPLICATION:
             $type = $_CORELANG['TXT_CORE_CM_TYPE_APPLICATION'] . ': ';
             $type .= $page->getModule();
             $type .= $page->getCmd() != '' ? ' | ' . $page->getCmd() : '';
             break;
         case \Cx\Core\ContentManager\Model\Entity\Page::TYPE_FALLBACK:
             $fallbackLangId = \FWLanguage::getFallbackLanguageIdById($page->getLang());
             if ($fallbackLangId == 0) {
                 $fallbackLangId = \FWLanguage::getDefaultLangId();
             }
             $type = $_CORELANG['TXT_CORE_CM_TYPE_FALLBACK'] . ' ';
             $type .= \FWLanguage::getLanguageCodeById($fallbackLangId);
             break;
         default:
             $type = $_CORELANG['TXT_CORE_CM_TYPE_CONTENT'];
     }
     return $type;
 }
 public function getTarget()
 {
     $this->_load();
     return parent::getTarget();
 }