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

Core/REST/Client/Output/ValueObjectVisitor/ContentTypeGroupCreateStruct.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor;
8
9 use eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor;
10 use eZ\Publish\Core\REST\Common\Output\Generator;
11 use eZ\Publish\Core\REST\Common\Output\Visitor;
12
16 class ContentTypeGroupCreateStruct extends ValueObjectVisitor
17 {
25 public function visit(Visitor $visitor, Generator $generator, $data)
26 {
27 $generator->startObjectElement('ContentTypeGroupInput');
28 $visitor->setHeader('Content-Type', $generator->getMediaType('ContentTypeGroupInput'));
29
30 $generator->startValueElement('identifier', $data->identifier);
31 $generator->endValueElement('identifier');
32
33 if ($data->creatorId !== null) {
34 $generator->startObjectElement('User');
35 $generator->startAttribute('href', $data->creatorId);
36 $generator->endAttribute('href');
37 $generator->endObjectElement('User');
38 }
39
40 if ($data->creationDate !== null) {
41 $generator->startValueElement('modificationDate', $data->creationDate->format('c'));
42 $generator->endValueElement('modificationDate');
43 }
44
45 $generator->endObjectElement('ContentTypeGroupInput');
46 }
47 }
eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ContentTypeGroupCreateStruct
ContentTypeGroupCreateStruct value object visitor.
Definition: Core/REST/Client/Output/ValueObjectVisitor/ContentTypeGroupCreateStruct.php:17
eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ContentTypeGroupCreateStruct\visit
visit(Visitor $visitor, Generator $generator, $data)
Visit struct returned by controllers.
Definition: Core/REST/Client/Output/ValueObjectVisitor/ContentTypeGroupCreateStruct.php:25
eZ\Publish\Core\REST\Common\Output\Generator
Output generator.
Definition: REST/Common/Output/Generator.php:13
eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor
Basic ValueObjectVisitor.
Definition: ValueObjectVisitor.php:18
eZ\Publish\Core\REST\Common\Output\Visitor
Visits a value object into an HTTP Response.
Definition: Visitor.php:15
eZ\Publish\Core\REST\Common\Output\Visitor\setHeader
setHeader($name, $value)
Set HTTP response header.
Definition: Visitor.php:64
eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor
Definition: Client/Output/ValueObjectVisitor/ContentObjectStates.php:7
eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor
Definition: Common/Output/ValueObjectVisitor/ContentObjectStates.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.