delete() публичный Метод

public delete ( )
Пример #1
0
 /**
  * @throws DAV\Exception\Forbidden
  * @throws \Exception
  */
 function delete()
 {
     if ($this->asset->isAllowed("delete")) {
         Asset\Service::loadAllFields($this->asset);
         $this->asset->delete();
         // add the asset to the delete history, this is used so come over problems with programs like photoshop (delete, create instead of replace => move)
         // for details see Asset\WebDAV\Tree::move()
         $log = Asset\WebDAV\Service::getDeleteLog();
         $this->asset->_fulldump = true;
         $log[$this->asset->getFullpath()] = array("id" => $this->asset->getId(), "timestamp" => time(), "data" => \Pimcore\Tool\Serialize::serialize($this->asset));
         unset($this->asset->_fulldump);
         Asset\WebDAV\Service::saveDeleteLog($log);
     } else {
         throw new DAV\Exception\Forbidden();
     }
 }
Пример #2
0
 /**
  * @throws DAV\Exception\Forbidden
  * @throws \Exception
  */
 function delete()
 {
     if ($this->asset->isAllowed("delete")) {
         $this->asset->delete();
     } else {
         throw new DAV\Exception\Forbidden();
     }
 }
Пример #3
0
 /**
  *
  */
 public function delete()
 {
     parent::delete();
     $this->clearThumbnails();
 }