/**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // stats
     if (FILEBASE_ENABLE_STATISTICS) {
         $this->stats = array_merge(StatsCacheBuilder::getInstance()->getData(), UserStatsCacheBuilder::getInstance()->getData());
     }
     // get categories
     $categoryTree = new FilebaseCategoryNodeTree('de.incendium.filebase.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('FilebaseOverview', array('application' => 'filebase')), 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 FilebaseCategoryNodeTree('de.incendium.filebase.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('boxEntryCategories', 'filebase', ['categoryList' => $categoryList, 'activeCategory' => $activeCategory]);
     }
 }
 /**
  * @see    \wcf\system\search\ISearchableObjectType::show()
  */
 public function show(IForm $form = null)
 {
     $categoryTree = new FilebaseCategoryNodeTree('de.incendium.filebase.category');
     $categoryList = $categoryTree->getIterator();
     $categoryList->setMaxDepth(0);
     // get existing values
     if ($form !== null && isset($form->searchData['additionalData']['de.incendium.filebase.entry'])) {
         $this->filebaseCategoryIDs = $form->searchData['additionalData']['de.incendium.filebase.entry']['filebaseCategoryIDs'];
     }
     WCF::getTPL()->assign(array('filebaseCategoryIDs' => $this->filebaseCategoryIDs, 'filebaseCategoryList' => $categoryList));
 }
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // get categories
     $excludedCategoryIDs = array_diff(FilebaseCategory::getAccessibleCategoryIDs(), FilebaseCategory::getAccessibleCategoryIDs(array('canUseCategory')));
     $categoryTree = new FilebaseCategoryNodeTree('de.incendium.filebase.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);
             }
         }
     }
 }
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // get categories
     $categoryTree = new FilebaseCategoryNodeTree('de.incendium.filebase.category');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     // add breadcrumbs
     FILEBASECore::getInstance()->setLocation($this->category->getParentCategories());
 }