public function addFolder(Folder $folder)
 {
     $id = $folder->getId();
     $path = new \stdClass();
     $path->path = $folder->getPath();
     $path->siteId = $folder->getSiteId();
     $path->siteName = $folder->getSiteName();
     $psi_std = new \stdClass();
     $psi_std->id = $id;
     $psi_std->path = $path;
     $psi_std->type = Folder::TYPE;
     $psi_std->recycled = false;
     $this->folders[] = new p\PublishableAssetIdentifier($psi_std);
     return $this;
 }
 public function setExpirationFolder(Folder $f)
 {
     $this->getProperty()->expirationFolderId = $f->getId();
     $this->getProperty()->expirationFolderPath = $f->getPath();
     return $this;
 }
 public function createXsltFormat(Folder $parent, $name, $xml)
 {
     if (trim($name) == "") {
         throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_FORMAT_NAME . E_SPAN);
     }
     if (trim($xml) == "") {
         throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_XML . E_SPAN);
     }
     $asset = AssetTemplate::getFormat(c\P::XSLTFORMAT);
     $asset->xsltFormat->name = $name;
     $asset->xsltFormat->parentFolderPath = $parent->getPath();
     $asset->xsltFormat->siteName = $parent->getSiteName();
     $asset->xsltFormat->xml = $xml;
     return $this->createAsset($asset, XsltFormat::TYPE, $this->getPath($parent, $name), $parent->getSiteName());
 }
 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 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;
 }