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

Publish/Core/REST/Client/Input/Parser/ContentTypeGroup.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\BaseParser;
10 use eZ\Publish\Core\REST\Common\Input\ParserTools;
11 use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher;
12 use eZ\Publish\Core\REST\Client\Values;
13
17 class ContentTypeGroup extends BaseParser
18 {
20 protected $parserTools;
21
25 public function __construct(ParserTools $parserTools)
26 {
27 $this->parserTools = $parserTools;
28 }
29
40 public function parse(array $data, ParsingDispatcher $parsingDispatcher)
41 {
42 $creatorId = $this->parserTools->parseObjectElement($data['Creator'], $parsingDispatcher);
43 $modifierId = $this->parserTools->parseObjectElement($data['Modifier'], $parsingDispatcher);
44
45 return new Values\ContentType\ContentTypeGroup(
46 array(
47 'id' => $data['_href'],
48 'identifier' => $data['identifier'],
49 'creationDate' => new \DateTime($data['created']),
50 'modificationDate' => new \DateTime($data['modified']),
51 'creatorId' => $creatorId,
52 'modifierId' => $modifierId,
53 )
54 );
55 }
56 }
eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup
Definition: Publish/API/Repository/Values/ContentType/ContentTypeGroup.php:24
eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup\$modifierId
$modifierId
Definition: Publish/API/Repository/Values/ContentType/ContentTypeGroup.php:65
eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup\$creatorId
$creatorId
Definition: Publish/API/Repository/Values/ContentType/ContentTypeGroup.php:58
eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeGroup\$parserTools
$parserTools
Definition: Publish/Core/REST/Client/Input/Parser/ContentTypeGroup.php:20
eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeGroup\__construct
__construct(ParserTools $parserTools)
Definition: Publish/Core/REST/Client/Input/Parser/ContentTypeGroup.php:25
eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeGroup\parse
parse(array $data, ParsingDispatcher $parsingDispatcher)
Parse input structure.
Definition: Publish/Core/REST/Client/Input/Parser/ContentTypeGroup.php:40
eZ\Publish\Core\REST\Client\Values\ContentType\ContentTypeGroup
REST Client ValueObject representing Content Type Group.
Definition: Publish/Core/REST/Client/Values/ContentType/ContentTypeGroup.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\Core\REST\$parserTools
$parserTools
Definition: common.php:120
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+.