eZ\Publish\Core\Repository\ContentService::loadContentByRemoteId PHP Method

loadContentByRemoteId() public method

If no version is given, the method returns the current version
public loadContentByRemoteId ( string $remoteId, array $languages = null, integer $versionNo = null, boolean $useAlwaysAvailable = true ) : eZ\Publish\API\Repository\Values\Content\Content
$remoteId string
$languages array A language filter for fields. If not given all languages are returned
$versionNo integer the version number. If not given the current version is returned
$useAlwaysAvailable boolean Add Main language to \$languages if true (default) and if alwaysAvailable is true
return eZ\Publish\API\Repository\Values\Content\Content
    public function loadContentByRemoteId($remoteId, array $languages = null, $versionNo = null, $useAlwaysAvailable = true)
    {
        $content = $this->internalLoadContent($remoteId, $languages, $versionNo, true, $useAlwaysAvailable);
        if (!$this->repository->canUser('content', 'read', $content)) {
            throw new UnauthorizedException('content', 'read', array('remoteId' => $remoteId));
        }
        if ($content->getVersionInfo()->status !== APIVersionInfo::STATUS_PUBLISHED && !$this->repository->canUser('content', 'versionread', $content)) {
            throw new UnauthorizedException('content', 'versionread', array('remoteId' => $remoteId, 'versionNo' => $versionNo));
        }
        return $content;
    }