Class

eZ\Publish\Core\REST\Common\FieldTypeProcessor\RelationProcessor

class RelationProcessor extends BaseRelationProcessor

Methods

setRouter(RouterInterface $router)

from BaseRelationProcessor
setLocationService(LocationService $locationService)

from BaseRelationProcessor
bool canMapContentHref()

from BaseRelationProcessor
string mapToContentHref(int $contentId)

from BaseRelationProcessor
string mapToLocationHref(int $locationId)

from BaseRelationProcessor
mixed preProcessFieldSettingsHash(mixed $incomingSettingsHash)

Perform manipulations on a received $incomingSettingsHash.

from BaseRelationProcessor
mixed postProcessFieldSettingsHash(mixed $outgoingSettingsHash)

Perform manipulations on a received $outgoingSettingsHash.

array postProcessValueHash(array $outgoingValueHash)

In addition to the destinationContentId, adds a destinationContentHref entry.

Details

in BaseRelationProcessor at line 28
public setRouter(RouterInterface $router)

Parameters

RouterInterface $router

in BaseRelationProcessor at line 36
public setLocationService(LocationService $locationService)

Parameters

LocationService $locationService

in BaseRelationProcessor at line 44
public bool canMapContentHref()

Return Value

bool

in BaseRelationProcessor at line 53
public string mapToContentHref(int $contentId)

Parameters

int $contentId

Return Value

string

in BaseRelationProcessor at line 62
public string mapToLocationHref(int $locationId)

Parameters

int $locationId

Return Value

string

in BaseRelationProcessor at line 69
public mixed preProcessFieldSettingsHash(mixed $incomingSettingsHash)

Perform manipulations on a received $incomingSettingsHash.

This method is called by the REST input parsers to allow a field type to pre process the given $incomingSettingsHash before it is handled by {@link eZ\Publish\SPI\FieldType\FieldType::fieldSettingsFromHash()}. The $incomingSettingsHash can be expected to conform to the rules that need to apply to hashes accepted by fieldSettingsFromHash(). The return value of this method replaces the $incomingSettingsHash.

Parameters

mixed $incomingSettingsHash

Return Value

mixed Pre processed hash

at line 33
public mixed postProcessFieldSettingsHash(mixed $outgoingSettingsHash)

Perform manipulations on a received $outgoingSettingsHash.

This method is called by the REST output visitors to allow a field type to post process the given $outgoingSettingsHash, which was previously generated using {@link eZ\Publish\SPI\FieldType\FieldType::fieldSettingsToHash()}, before it is sent to the client. The return value of this method replaces $outgoingSettingsHash and must obey to the same rules as the original $outgoingSettingsHash.

Parameters

mixed $outgoingSettingsHash

Return Value

mixed Post processed hash

at line 20
public array postProcessValueHash(array $outgoingValueHash)

In addition to the destinationContentId, adds a destinationContentHref entry.

Parameters

array $outgoingValueHash

Return Value

array