public function setExpirationFolder(Folder $f)
 {
     $this->getProperty()->expirationFolderId = $f->getId();
     $this->getProperty()->expirationFolderPath = $f->getPath();
     return $this;
 }
 public function createFolderIndexBlock(Folder $parent, $name, Folder $f = NULL, $max_rendered_assets = 0)
 {
     if (trim($name) == "") {
         throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_BLOCK_NAME . E_SPAN);
     }
     $asset = AssetTemplate::getIndexBlock(c\T::FOLDER);
     $asset->indexBlock->name = $name;
     $asset->indexBlock->parentFolderPath = $parent->getPath();
     $asset->indexBlock->siteName = $parent->getSiteName();
     $asset->indexBlock->maxRenderedAssets = $max_rendered_assets;
     $asset->indexBlock->renderingBehavior = "render-normally";
     if (isset($f)) {
         $asset->indexBlock->indexFolderId = $f->getId();
         $asset->indexBlock->indexedFolderPath = $f->getPath();
     }
     $asset->indexBlock->indexPages = false;
     $asset->indexBlock->indexBlocks = false;
     $asset->indexBlock->indexLinks = false;
     $asset->indexBlock->indexFiles = false;
     $asset->indexBlock->indexRegularContent = false;
     $asset->indexBlock->indexSystemMetadata = false;
     $asset->indexBlock->indexUserMetadata = false;
     $asset->indexBlock->indexAccessRights = false;
     $asset->indexBlock->indexUserInfo = false;
     $asset->indexBlock->indexWorkflowInfo = false;
     $asset->indexBlock->appendCallingPageData = false;
     $asset->indexBlock->sortMethod = c\T::ALPHABETICAL;
     $asset->indexBlock->sortOrder = c\T::DESCENDING;
     $asset->indexBlock->pageXML = c\T::NORENDER;
     return $this->createAsset($asset, IndexBlock::TYPE, $this->getPath($parent, $name), $parent->getSiteName());
 }
 public function setPlacementFolder(Folder $folder)
 {
     if ($folder == NULL) {
         throw new e\NullAssetException(S_SPAN . c\M::NULL_FOLDER . E_SPAN);
     }
     $this->getProperty()->placementFolderId = $folder->getId();
     $this->getProperty()->placementFolderPath = $folder->getPath();
     return $this;
 }
 public function setFolder(Folder $folder)
 {
     if ($this->getIndexBlockType() != Folder::TYPE) {
         throw new \Exception(S_SPAN . "This block is not a folder index block." . E_SPAN);
     }
     $this->getProperty()->indexedFolderId = $folder->getId();
     $this->getProperty()->indexedFolderPath = $folder->getPath();
     return $this;
 }
 public function removeFolder(Folder $folder)
 {
     $id = $folder->getId();
     $temp = array();
     foreach ($this->folders as $folder) {
         if ($folder->getId() != $id) {
             $temp[] = $folder;
         }
     }
     $this->folders = $temp;
     return $this;
 }