eZ\Publish\Core\REST\Client\ContentService::loadRelations PHP Method

loadRelations() public method

Loads all outgoing relations for the given version.
public loadRelations ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Relation[]
$versionInfo eZ\Publish\API\Repository\Values\Content\VersionInfo
return eZ\Publish\API\Repository\Values\Content\Relation[]
    public function loadRelations(VersionInfo $versionInfo)
    {
        throw new \Exception('@todo: Implement.');
    }

Usage Example

Esempio n. 1
0
 /**
  * Parse input structure.
  *
  * @param array $data
  * @param \eZ\Publish\Core\REST\Common\Input\ParsingDispatcher $parsingDispatcher
  *
  * @return \eZ\Publish\Core\REST\Server\Values\Version
  */
 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
 {
     $contentId = $this->requestParser->parseHref($data['VersionInfo']['Content']['_href'], 'contentId');
     $content = $this->contentService->loadContent($contentId, null, $data['VersionInfo']['versionNo']);
     $contentType = $this->contentTypeService->loadContentType($content->contentInfo->contentTypeId);
     $relations = $this->contentService->loadRelations($content->versionInfo);
     return new VersionValue($content, $contentType, $relations);
 }