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

loadLocationDataByContent() public method

Loads data for all Locations for $contentId, optionally only in the subtree starting at $rootLocationId.
public loadLocationDataByContent ( integer $contentId, integer $rootLocationId = null ) : array
$contentId integer
$rootLocationId integer
return array
    public function loadLocationDataByContent($contentId, $rootLocationId = null)
    {
        $query = $this->handler->createSelectQuery();
        $query->select('*')->from($this->handler->quoteTable('ezcontentobject_tree'))->where($query->expr->eq($this->handler->quoteColumn('contentobject_id'), $query->bindValue($contentId)));
        if ($rootLocationId !== null) {
            $this->applySubtreeLimitation($query, $rootLocationId);
        }
        $statement = $query->prepare();
        $statement->execute();
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }