/**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // stats
     if (LINKLIST_ENABLE_STATISTICS) {
         $this->stats = array_merge(StatsCacheBuilder::getInstance()->getData(), UserStatsCacheBuilder::getInstance()->getData());
     }
     // get categories
     $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     // get featured entries
     $this->featuredEntryList = new AccessibleEntryList();
     $this->featuredEntryList->getConditionBuilder()->add('entry.isFeatured = ?', array(1));
     $this->featuredEntryList->sqlLimit = 10;
     $this->featuredEntryList->sqlOrderBy = 'RAND()';
     $this->featuredEntryList->readObjects();
     // remove default breadcrumb entry and set current page as 'website'
     if (WCF::isLandingPage()) {
         MetaTagHandler::getInstance()->addTag('og:url', 'og:url', LinkHandler::getInstance()->getLink('Linklist', array('application' => 'linklist')), true);
         MetaTagHandler::getInstance()->addTag('og:type', 'og:type', 'website', true);
         MetaTagHandler::getInstance()->addTag('og:title', 'og:title', WCF::getLanguage()->get(PAGE_TITLE), true);
         MetaTagHandler::getInstance()->addTag('og:description', 'og:description', WCF::getLanguage()->get(PAGE_DESCRIPTION), true);
     }
 }
 /**
  * @inheritDoc
  */
 protected function loadContent()
 {
     // get categories
     $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category');
     $categoryList = $categoryTree->getIterator();
     $categoryList->setMaxDepth(0);
     if (iterator_count($categoryList)) {
         // get active category
         $activeCategory = null;
         if (RequestHandler::getInstance()->getActiveRequest()->getRequestObject() instanceof EntryListPage) {
             if (RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->category !== null) {
                 $activeCategory = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()->category;
             }
         }
         $this->content = WCF::getTPL()->fetch('boxCategories', 'linklist', ['categoryList' => $categoryList, 'activeCategory' => $activeCategory]);
     }
 }
 /**
  *
  * @see wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     // add breadcrumbs
     LINKLISTCore::getInstance()->setLocation($this->category->getParentCategories());
 }
 /**
  * @see    \wcf\system\search\ISearchableObjectType::show()
  */
 public function show(IForm $form = null)
 {
     $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category');
     $categoryList = $categoryTree->getIterator();
     $categoryList->setMaxDepth(0);
     // get existing values
     if ($form !== null && isset($form->searchData['additionalData']['de.incendium.linklist.entry'])) {
         $this->linklistCategoryIDs = $form->searchData['additionalData']['de.incendium.linklist.entry']['linklistCategoryIDs'];
     }
     WCF::getTPL()->assign(array('linklistCategoryIDs' => $this->linklistCategoryIDs, 'linklistCategoryList' => $categoryList));
 }
 /**
  * @see    \wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // get categories
     $excludedCategoryIDs = array_diff(LinklistCategory::getAccessibleCategoryIDs(), LinklistCategory::getAccessibleCategoryIDs(array('canUseCategory')));
     $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category', 0, false, $excludedCategoryIDs);
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     if (empty($_POST)) {
         // multilingualism
         if (!empty($this->availableContentLanguages)) {
             if (!$this->languageID) {
                 $language = LanguageFactory::getInstance()->getUserLanguage();
                 $this->languageID = $language->languageID;
             }
             if (!isset($this->availableContentLanguages[$this->languageID])) {
                 $languageIDs = array_keys($this->availableContentLanguages);
                 $this->languageID = array_shift($languageIDs);
             }
         }
     }
 }