Ejemplo n.º 1
0
 /**
  * @see	\wcf\system\cache\builder\AbstractCacheBuilder::rebuild()
  */
 public function rebuild(array $parameters)
 {
     $data = array('files' => array(), 'filesToCategory' => array());
     $list = new FileList();
     $list->readObjects();
     foreach ($data['files'] = $list->getObjects() as $file) {
         foreach ($file->getCategoryIDs() as $categoryID) {
             $data['filesToCategory'][$file->fileID] = $categoryID;
         }
     }
     return $data;
 }
Ejemplo n.º 2
0
 protected function init()
 {
     $this->pages = PageCacheBuilder::getInstance()->getData(array(), 'pages');
     $this->contents = ContentCacheBuilder::getInstance()->getData(array(), 'contents');
     $list = new StylesheetList();
     $list->readObjects();
     $this->stylesheets = $list->getObjects();
     $this->categoryObjectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.category', 'de.codequake.cms.file');
     $list = new CategoryList();
     $list->getConditionBuilder()->add("objectTypeID = ?", array($this->categoryObjectType->objectTypeID));
     $list->readObjects();
     $this->folders = $list->getObjects();
     $list = new FileList();
     $list->readObjects();
     $this->files = $list->getObjects();
 }