PHP Класс eZ\Publish\Core\Repository\Helper\RelationProcessor

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$persistenceHandler eZ\Publish\SPI\Persistence\Handler

Открытые методы

Метод Описание
__construct ( eZ\Publish\SPI\Persistence\Handler $handler ) Setups service with reference to repository object that created it & corresponding handler.
appendFieldRelations ( array &$relations, array &$locationIdToContentIdMapping, eZ\Publish\SPI\FieldType\FieldType $fieldType, Value $fieldValue, string $fieldDefinitionId ) Appends destination Content ids of given $fieldValue to the $relation array.
processFieldRelations ( array $inputRelations, mixed $sourceContentId, mixed $sourceContentVersionNo, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, array $existingRelations = [] ) Persists relation data for a content version.

Описание методов

__construct() публичный Метод

Setups service with reference to repository object that created it & corresponding handler.
public __construct ( eZ\Publish\SPI\Persistence\Handler $handler )
$handler eZ\Publish\SPI\Persistence\Handler

appendFieldRelations() публичный Метод

If $fieldValue contains Location ids, the will be converted to the Content id that Location encapsulates.
public appendFieldRelations ( array &$relations, array &$locationIdToContentIdMapping, eZ\Publish\SPI\FieldType\FieldType $fieldType, Value $fieldValue, string $fieldDefinitionId )
$relations array
$locationIdToContentIdMapping array An array with Location Ids as keys and corresponding Content Id as values
$fieldType eZ\Publish\SPI\FieldType\FieldType
$fieldValue eZ\Publish\Core\FieldType\Value Accepted field value.
$fieldDefinitionId string

processFieldRelations() публичный Метод

This method creates new relations and deletes removed relations.
public processFieldRelations ( array $inputRelations, mixed $sourceContentId, mixed $sourceContentVersionNo, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, array $existingRelations = [] )
$inputRelations array
$sourceContentId mixed
$sourceContentVersionNo mixed
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType
$existingRelations array An array of existing relations for Content version (empty when creating new content)

Описание свойств

$persistenceHandler защищенное свойство

protected Handler,eZ\Publish\SPI\Persistence $persistenceHandler
Результат eZ\Publish\SPI\Persistence\Handler