Class

eZ\Publish\Core\REST\Common\FieldTypeProcessor\BaseRelationProcessor

abstract class BaseRelationProcessor extends FieldTypeProcessor

Methods

mixed preProcessValueHash(mixed $incomingValueHash)

Perform manipulations on a received $incomingValueHash.

from FieldTypeProcessor
mixed postProcessValueHash(mixed $outgoingValueHash)

Perform manipulations on an a generated $outgoingValueHash.

from FieldTypeProcessor
mixed preProcessFieldSettingsHash(mixed $incomingSettingsHash)

Perform manipulations on a received $incomingSettingsHash.

mixed postProcessFieldSettingsHash(mixed $outgoingSettingsHash)

Perform manipulations on a received $outgoingSettingsHash.

mixed preProcessValidatorConfigurationHash(mixed $incomingValidatorConfigurationHash)

Perform manipulations on a received $incomingValidatorConfigurationHash.

from FieldTypeProcessor
mixed postProcessValidatorConfigurationHash(mixed $outgoingValidatorConfigurationHash)

Perform manipulations on a received $outgoingValidatorConfigurationHash.

from FieldTypeProcessor
setRouter(RouterInterface $router)

setLocationService(LocationService $locationService)

bool canMapContentHref()

string mapToContentHref(int $contentId)

string mapToLocationHref(int $locationId)

Details

in FieldTypeProcessor at line 32
public mixed preProcessValueHash(mixed $incomingValueHash)

Perform manipulations on a received $incomingValueHash.

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

Parameters

mixed $incomingValueHash

Return Value

mixed Pre processed hash

See also

\eZ\Publish\Core\REST\Common\Input\FieldTypeParser

in FieldTypeProcessor at line 53
public mixed postProcessValueHash(mixed $outgoingValueHash)

Perform manipulations on an a generated $outgoingValueHash.

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

Parameters

mixed $outgoingValueHash

Return Value

mixed Post processed hash

See also

\eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer

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 84
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

in FieldTypeProcessor at line 116
public mixed preProcessValidatorConfigurationHash(mixed $incomingValidatorConfigurationHash)

Perform manipulations on a received $incomingValidatorConfigurationHash.

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

Parameters

mixed $incomingValidatorConfigurationHash

Return Value

mixed Pre processed hash

See also

\eZ\Publish\Core\REST\Common\Input\FieldTypeParser

in FieldTypeProcessor at line 137
public mixed postProcessValidatorConfigurationHash(mixed $outgoingValidatorConfigurationHash)

Perform manipulations on a received $outgoingValidatorConfigurationHash.

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

Parameters

mixed $outgoingValidatorConfigurationHash

Return Value

mixed Post processed hash

See also

\eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer

at line 28
public setRouter(RouterInterface $router)

Parameters

RouterInterface $router

at line 36
public setLocationService(LocationService $locationService)

Parameters

LocationService $locationService

at line 44
public bool canMapContentHref()

Return Value

bool

at line 53
public string mapToContentHref(int $contentId)

Parameters

int $contentId

Return Value

string

at line 62
public string mapToLocationHref(int $locationId)

Parameters

int $locationId

Return Value

string