/**
  * @see	\wcf\system\option\IOptionType::getFormElement()
  */
 public function getFormElement(Option $option, $value)
 {
     $nodeTree = new PageNodeTree();
     $nodeList = $nodeTree->getIterator();
     WCF::getTPL()->assign(array('nodeList' => $nodeList, 'option' => $option, 'value' => !is_array($value) ? explode("\n", $value) : $value));
     return WCF::getTPL()->fetch('pageMultiSelectOptionType', 'cms');
 }
Ejemplo n.º 2
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->objectTypeList = ObjectTypeCache::getInstance()->getObjectTypes('de.codequake.cms.content.type');
     // read pages
     $pageNodeTree = new PageNodeTree();
     $this->pageList = $pageNodeTree->getIterator();
 }
Ejemplo n.º 3
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $pageNodeTree = new PageNodeTree();
     $this->pageList = $pageNodeTree->getIterator();
     $this->contentListBody = new DrainedPositionContentNodeTree(null, $this->pageID, null, 'body', 1);
     $this->contentListSidebar = new DrainedPositionContentNodeTree(null, $this->pageID, null, 'sidebar', 1);
     $this->objectTypeList = ObjectTypeCache::getInstance()->getObjectTypes('de.codequake.cms.content.type');
 }
Ejemplo n.º 4
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // read page list
     $pageNodeTree = new PageNodeTree();
     $this->pageList = $pageNodeTree->getIterator();
     // read content list
     $contentNodeTree = new ContentNodeTree(null, 0, 1);
     $this->contentList = $contentNodeTree->getIterator();
 }
Ejemplo n.º 5
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // set default values
     if (empty($_POST)) {
         $dateTime = DateUtil::getDateTimeByTimestamp(TIME_NOW);
         $dateTime->setTimezone(WCF::getUser()->getTimeZone());
         $this->deactivationDate = $this->publicationDate = $dateTime->format('c');
     }
     $pageNodeTree = new PageNodeTree();
     $this->pageList = $pageNodeTree->getIterator();
     $this->stylesheetList = new StylesheetList();
     $this->stylesheetList->readObjects();
     // load menu items
     $menuItemList = new PageMenuItemList();
     $menuItemList->getConditionBuilder()->add('page_menu_item.menuPosition = ?', array('header'));
     $menuItemList->sqlOrderBy = 'page_menu_item.parentMenuItem ASC, page_menu_item.showOrder ASC';
     $menuItemList->readObjects();
     foreach ($menuItemList as $menuItem) {
         if ($menuItem->parentMenuItem) {
             if (isset($this->menuItems[$menuItem->parentMenuItem])) {
                 $this->menuItems[$menuItem->parentMenuItem]->addChild($menuItem);
             }
         } else {
             $this->menuItems[$menuItem->menuItem] = new ViewablePageMenuItem($menuItem);
         }
     }
 }
Ejemplo n.º 6
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // overwrite page list
     $pageNodeTree = new DrainedPageNodeTree(null, $this->pageID);
     $this->pageList = $pageNodeTree->getIterator();
     // read page node list for 'choose page' button
     $choosePageNodeTree = new PageNodeTree();
     $this->choosePageNodeList = $choosePageNodeTree->getIterator();
     if (empty($_POST)) {
         // general data
         I18nHandler::getInstance()->setOptions('title', PACKAGE_ID, $this->page->title, 'cms.page.title\\d+');
         $this->alias = $this->page->alias;
         I18nHandler::getInstance()->setOptions('description', PACKAGE_ID, $this->page->description, 'cms.page.description\\d+');
         // meta information
         I18nHandler::getInstance()->setOptions('metaDescription', PACKAGE_ID, $this->page->metaDescription, 'cms.page.metaDescription\\d+');
         I18nHandler::getInstance()->setOptions('metaKeywords', PACKAGE_ID, $this->page->metaKeywords, 'cms.page.metaKeywords\\d+');
         $this->allowIndexing = $this->page->allowIndexing;
         // position
         $this->parentID = $this->page->parentID;
         $this->showOrder = $this->page->showOrder;
         $this->invisible = $this->page->invisible;
         // publication
         if (!$this->page->isPublished) {
             $this->enableDelayedPublication = 1;
             $dateTime = DateUtil::getDateTimeByTimestamp($this->page->publicationDate);
             $dateTime->setTimezone(WCF::getUser()->getTimeZone());
             $this->publicationDate = $dateTime->format('c');
         }
         if ($this->page->deactivationDate) {
             $this->enableDelayedDeactivation = 1;
             $dateTime = DateUtil::getDateTimeByTimestamp($this->page->deactivationDate);
             $dateTime->setTimezone(WCF::getUser()->getTimeZone());
             $this->deactivationDate = $dateTime->format('c');
         }
         // settings
         $this->menuItemID = $this->page->menuItemID;
         $this->isCommentable = $this->page->isCommentable;
         $this->availableDuringOfflineMode = $this->page->availableDuringOfflineMode;
         $this->allowSubscribing = $this->page->allowSubscribing;
         // display
         $this->styleID = $this->page->styleID;
         $this->stylesheetIDs = $this->page->getStylesheetIDs();
         // display settings
         $this->sidebarOrientation = $this->page->sidebarOrientation;
     }
 }