eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::loadLocationDataByContent PHP Method

loadLocationDataByContent() abstract public method

Loads data for all Locations for $contentId, optionally only in the subtree starting at $rootLocationId.
abstract public loadLocationDataByContent ( integer $contentId, integer $rootLocationId = null ) : array
$contentId integer
$rootLocationId integer
return array
    public abstract function loadLocationDataByContent($contentId, $rootLocationId = null);

Usage Example

 /**
  * Loads data for all Locations for $contentId, optionally only in the
  * subtree starting at $rootLocationId
  *
  * @param int $contentId
  * @param int $rootLocationId
  *
  * @return array
  */
 public function loadLocationDataByContent($contentId, $rootLocationId = null)
 {
     try {
         return $this->innerGateway->loadLocationDataByContent($contentId, $rootLocationId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::loadLocationDataByContent