public function deleteResource(core_kernel_classes_Resource $resource)
    {
        if (LockManager::getImplementation()->isLocked($resource)) {
            $userId = common_session_SessionManager::getSession()->getUser()->getIdentifier();
            LockManager::getImplementation()->releaseLock($resource, $userId);
        }

        $result = $this->deleteItemContent($resource) && parent::deleteResource($resource);

        if ($result) {
            $this->getEventManager()->trigger(new ItemRemovedEvent($resource->getUri()));
        }

        return $result;
    }
public function deleteResource(core_kernel_classes_Resource $resource)
    {
        if (LockManager::getImplementation()->isLocked($resource)) {
            $userId = common_session_SessionManager::getSession()->getUser()->getIdentifier();
            LockManager::getImplementation()->releaseLock($resource, $userId);
        }

        $result = $this->deleteItemContent($resource) && parent::deleteResource($resource);

        if ($result) {
            $this->getEventManager()->trigger(new ItemRemovedEvent($resource->getUri()));
        }

        return $result;
    }
public function deleteResource ( core_kernel_classes_Resource $ resource ) { if ( LockManager :: getImplementation ( ) -> isLocked ( $ resource ) ) { $ userId = common_session_SessionManager :: getSession ( ) -> getUser ( ) -> getIdentifier ( ) ; LockManager :: getImplementation ( ) -> releaseLock ( $ resource , $ userId ) ; } $ result = $ this -> deleteItemContent ( $ resource ) && parent :: deleteResource ( $ resource ) ; if ( $ result ) { $ this -> getEventManager ( ) -> trigger ( new ItemRemovedEvent ( $ resource -> getUri ( ) ) ) ; } return $ result ; }
delete an item
@param core_kernel_classes_Resource $resource
@throws common_exception_Unauthorized
@return boolean
delete an item