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

TimeProcessor.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Common\FieldTypeProcessor;
8
9 use eZ\Publish\Core\REST\Common\FieldTypeProcessor;
10 use eZ\Publish\Core\FieldType\Time\Type;
11
12 class TimeProcessor extends FieldTypeProcessor
13 {
17 public function preProcessFieldSettingsHash($incomingSettingsHash)
18 {
19 if (isset($incomingSettingsHash['defaultType'])) {
20 switch ($incomingSettingsHash['defaultType']) {
21 case 'DEFAULT_EMPTY':
22 $incomingSettingsHash['defaultType'] = Type::DEFAULT_EMPTY;
23 break;
24 case 'DEFAULT_CURRENT_TIME':
25 $incomingSettingsHash['defaultType'] = Type::DEFAULT_CURRENT_TIME;
26 }
27 }
28
29 return $incomingSettingsHash;
30 }
31
35 public function postProcessFieldSettingsHash($outgoingSettingsHash)
36 {
37 if (isset($outgoingSettingsHash['defaultType'])) {
38 switch ($outgoingSettingsHash['defaultType']) {
39 case Type::DEFAULT_EMPTY:
40 $outgoingSettingsHash['defaultType'] = 'DEFAULT_EMPTY';
41 break;
42 case Type::DEFAULT_CURRENT_TIME:
43 $outgoingSettingsHash['defaultType'] = 'DEFAULT_CURRENT_TIME';
44 }
45 }
46
47 return $outgoingSettingsHash;
48 }
49 }
eZ\Publish\Core\FieldType\Time\Type
Definition: Core/FieldType/Time/Type.php:17
eZ\Publish\Core\REST\Common\FieldTypeProcessor\TimeProcessor
Definition: TimeProcessor.php:13
eZ\Publish\Core\REST\Common\FieldTypeProcessor\TimeProcessor\postProcessFieldSettingsHash
postProcessFieldSettingsHash($outgoingSettingsHash)
{Perform manipulations on a received $outgoingSettingsHash.This method is called by the REST output v...
Definition: TimeProcessor.php:35
eZ\Publish\Core\REST\Common\FieldTypeProcessor\TimeProcessor\preProcessFieldSettingsHash
preProcessFieldSettingsHash($incomingSettingsHash)
{Perform manipulations on a received $incomingSettingsHash.This method is called by the REST input pa...
Definition: TimeProcessor.php:17
eZ\Publish\Core\REST\Common\FieldTypeProcessor
FieldTypeProcessor.
Definition: FieldTypeProcessor.php:13
eZ\Publish\Core\REST\Common\FieldTypeProcessor
Definition: AuthorProcessor.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.