Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

REST/Common/FieldTypeProcessor/RelationProcessor.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Common\FieldTypeProcessor;
8
9 class RelationProcessor extends BaseRelationProcessor
10 {
18 public function postProcessValueHash($outgoingValueHash)
19 {
20 if (!isset($outgoingValueHash['destinationContentId']) || !$this->canMapContentHref()) {
21 return $outgoingValueHash;
22 }
23
24 $outgoingValueHash['destinationContentHref'] = $this->mapToContentHref(
25 $outgoingValueHash['destinationContentId']
26 );
27
28 return $outgoingValueHash;
29 }
30
31 public function postProcessFieldSettingsHash($outgoingSettingsHash)
32 {
33 $outgoingSettingsHash = parent::postProcessFieldSettingsHash($outgoingSettingsHash);
34
35 if (!empty($outgoingSettingsHash['selectionRoot'])) {
36 $outgoingSettingsHash['selectionRootHref'] = $this->mapToLocationHref(
37 $outgoingSettingsHash['selectionRoot']
38 );
39 }
40
41 return $outgoingSettingsHash;
42 }
43 }
eZ\Publish\Core\REST\Common\FieldTypeProcessor\BaseRelationProcessor
Definition: BaseRelationProcessor.php:15
eZ\Publish\Core\REST\Common\FieldTypeProcessor\BaseRelationProcessor\mapToContentHref
mapToContentHref($contentId)
Definition: BaseRelationProcessor.php:51
eZ\Publish\Core\REST\Common\FieldTypeProcessor\BaseRelationProcessor\canMapContentHref
canMapContentHref()
Definition: BaseRelationProcessor.php:41
eZ\Publish\Core\REST\Common\FieldTypeProcessor\BaseRelationProcessor\mapToLocationHref
mapToLocationHref($locationId)
Definition: BaseRelationProcessor.php:61
eZ\Publish\Core\REST\Common\FieldTypeProcessor\RelationProcessor
Definition: REST/Common/FieldTypeProcessor/RelationProcessor.php:10
eZ\Publish\Core\REST\Common\FieldTypeProcessor\RelationProcessor\postProcessFieldSettingsHash
postProcessFieldSettingsHash($outgoingSettingsHash)
Perform manipulations on a received $outgoingSettingsHash.
Definition: REST/Common/FieldTypeProcessor/RelationProcessor.php:31
eZ\Publish\Core\REST\Common\FieldTypeProcessor\RelationProcessor\postProcessValueHash
postProcessValueHash($outgoingValueHash)
In addition to the destinationContentId, adds a destinationContentHref entry.
Definition: REST/Common/FieldTypeProcessor/RelationProcessor.php:18
eZ\Publish\Core\REST\Common\FieldTypeProcessor
Definition: AuthorProcessor.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.