eZ\Publish\Core\Repository\LocationService::loadLocationByRemoteId PHP Method

loadLocationByRemoteId() public method

Loads a location object from its $remoteId.
public loadLocationByRemoteId ( string $remoteId ) : eZ\Publish\API\Repository\Values\Content\Location
$remoteId string
return eZ\Publish\API\Repository\Values\Content\Location
    public function loadLocationByRemoteId($remoteId)
    {
        if (!is_string($remoteId)) {
            throw new InvalidArgumentValue('remoteId', $remoteId);
        }
        $spiLocation = $this->persistenceHandler->locationHandler()->loadByRemoteId($remoteId);
        $location = $this->domainMapper->buildLocationDomainObject($spiLocation);
        if (!$this->repository->canUser('content', 'read', $location->getContentInfo(), $location)) {
            throw new UnauthorizedException('content', 'read');
        }
        return $location;
    }