getAllLocationIds() abstract public method

Returns all IDs for locations that refer to $contentId.
abstract public getAllLocationIds ( integer $contentId ) : int[]
$contentId integer
return int[]
コード例 #1
0
 /**
  * Returns all IDs for locations that refer to $contentId
  *
  * @param int $contentId
  *
  * @return int[]
  */
 public function getAllLocationIds($contentId)
 {
     try {
         return $this->innerGateway->getAllLocationIds($contentId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
コード例 #2
0
ファイル: Handler.php プロジェクト: Pixy/ezpublish-kernel
 /**
  * Deletes all versions and fields, all locations (subtree), and all relations.
  *
  * Removes the relations, but not the related objects. All subtrees of the
  * assigned nodes of this content objects are removed (recursively).
  *
  * @param int $contentId
  *
  * @return bool
  */
 public function deleteContent($contentId)
 {
     $contentLocations = $this->contentGateway->getAllLocationIds($contentId);
     if (empty($contentLocations)) {
         $this->removeRawContent($contentId);
     } else {
         foreach ($contentLocations as $locationId) {
             $this->treeHandler->removeSubtree($locationId);
         }
     }
 }