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

Output/ValueObjectVisitor/CreatedContentTypeGroup.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor;
8
9 use eZ\Publish\Core\REST\Common\Output\Generator;
10 use eZ\Publish\Core\REST\Common\Output\Visitor;
11
17 class CreatedContentTypeGroup extends ContentTypeGroup
18 {
26 public function visit(Visitor $visitor, Generator $generator, $data)
27 {
28 parent::visit($visitor, $generator, $data->contentTypeGroup);
29 $visitor->setHeader(
30 'Location',
31 $this->router->generate(
32 'ezpublish_rest_loadContentTypeGroup',
33 ['contentTypeGroupId' => $data->contentTypeGroup->id]
34 )
35 );
36 $visitor->setStatus(201);
37 }
38 }
eZ\Publish\Core\REST\Common\Output\Generator
Output generator.
Definition: REST/Common/Output/Generator.php:13
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\setStatus
setStatus($statusCode)
Sets the given status code in the corresponding header.
Definition: Visitor.php:78
eZ\Publish\Core\REST\Common\Output\Visitor\setHeader
setHeader($name, $value)
Set HTTP response header.
Definition: Visitor.php:64
eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentTypeGroup
ContentTypeGroup value object visitor.
Definition: Publish/Core/REST/Server/Output/ValueObjectVisitor/ContentTypeGroup.php:18
eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedContentTypeGroup
CreatedContentTypeGroup value object visitor.
Definition: Output/ValueObjectVisitor/CreatedContentTypeGroup.php:18
eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedContentTypeGroup\visit
visit(Visitor $visitor, Generator $generator, $data)
Visit struct returned by controllers.
Definition: Output/ValueObjectVisitor/CreatedContentTypeGroup.php:26
eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor
Definition: Output/ValueObjectVisitor/BadRequestException.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.