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;
    }