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

Client/Input/Parser/FieldDefinitionList.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Client\Input\Parser;
8
9 use eZ\Publish\Core\REST\Common\Input\ParserTools;
10 use eZ\Publish\Core\REST\Common\Input\BaseParser;
11 use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher;
12 use eZ\Publish\Core\REST\Client\Values;
13 use eZ\Publish\API\Repository\ContentTypeService;
14
18 class FieldDefinitionList extends BaseParser
19 {
21 protected $parserTools;
22
24 protected $contentTypeService;
25
30 public function __construct(ParserTools $parserTools, ContentTypeService $contentTypeService)
31 {
32 $this->parserTools = $parserTools;
33 $this->contentTypeService = $contentTypeService;
34 }
35
44 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
45 {
46 $fieldDefinitionReferences = array();
47
48 foreach ($data['FieldDefinition'] as $fieldDefinitionData) {
49 $fieldDefinitionReferences[] = $this->parserTools->parseObjectElement(
50 $fieldDefinitionData,
51 $parsingDispatcher
52 );
53 }
54
55 return new Values\FieldDefinitionList(
56 $this->contentTypeService,
57 $fieldDefinitionReferences
58 );
59 }
60 }
eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinitionList
Parser for FieldDefinitionList.
Definition: Client/Input/Parser/FieldDefinitionList.php:19
eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinitionList\__construct
__construct(ParserTools $parserTools, ContentTypeService $contentTypeService)
Definition: Client/Input/Parser/FieldDefinitionList.php:30
eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinitionList\parse
parse(array $data, ParsingDispatcher $parsingDispatcher)
Parse input structure.
Definition: Client/Input/Parser/FieldDefinitionList.php:44
eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinitionList\$parserTools
$parserTools
Definition: Client/Input/Parser/FieldDefinitionList.php:21
eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinitionList\$contentTypeService
$contentTypeService
Definition: Client/Input/Parser/FieldDefinitionList.php:24
eZ\Publish\Core\REST\Client\Values\FieldDefinitionList
FieldDefinitionList.
Definition: Client/Values/FieldDefinitionList.php:15
eZ\Publish\Core\REST\Common\Input\BaseParser
Definition: BaseParser.php:12
eZ\Publish\Core\REST\Common\Input\ParserTools
Tools object to be used in Input Parsers.
Definition: ParserTools.php:17
eZ\Publish\Core\REST\Common\Input\ParsingDispatcher
Parsing dispatcher.
Definition: ParsingDispatcher.php:15
eZ\Publish\API\Repository\ContentTypeService
Definition: API/Repository/ContentTypeService.php:25
eZ\Publish\Core\REST\Client\Input\Parser
Definition: Publish/Core/REST/Client/Input/Parser/Content.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.