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

Publish/Core/MVC/Symfony/View/ContentView.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\View;
8
9 use eZ\Publish\API\Repository\Values\Content\Content;
10 use eZ\Publish\API\Repository\Values\Content\Location;
11
39 class ContentView extends BaseView implements View, ContentValueView, LocationValueView, EmbedView, CachableView
40 {
42 private $content;
43
45 private $location;
46
48 private $isEmbed = false;
49
53 public function setContent(Content $content)
54 {
55 $this->content = $content;
56 }
57
63 public function getContent()
64 {
65 return $this->content;
66 }
67
71 public function setLocation(Location $location)
72 {
73 $this->location = $location;
74 }
75
79 public function getLocation()
80 {
81 return $this->location;
82 }
83
84 protected function getInternalParameters()
85 {
86 $parameters = ['content' => $this->content];
87 if ($this->location !== null) {
88 $parameters['location'] = $this->location;
89 }
90
91 return $parameters;
92 }
93
99 public function setIsEmbed($value)
100 {
101 $this->isEmbed = (bool)$value;
102 }
103
109 public function isEmbed()
110 {
111 return $this->isEmbed;
112 }
113 }
eZ\Publish\API\Repository\Values\Content\Content
Definition: Publish/API/Repository/Values/Content/Content.php:21
eZ\Publish\API\Repository\Values\Content\Location
Definition: API/Repository/Values/Content/Location.php:32
eZ\Publish\Core\MVC\Symfony\View\BaseView
Definition: BaseView.php:14
eZ\Publish\Core\MVC\Symfony\View\BaseView\$parameters
$parameters
Definition: BaseView.php:19
eZ\Publish\Core\MVC\Symfony\View\ContentView
Main object to be rendered by the View Manager when viewing a content.
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:40
eZ\Publish\Core\MVC\Symfony\View\ContentView\$content
$content
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:42
eZ\Publish\Core\MVC\Symfony\View\ContentView\$isEmbed
$isEmbed
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:48
eZ\Publish\Core\MVC\Symfony\View\ContentView\setContent
setContent(Content $content)
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:53
eZ\Publish\Core\MVC\Symfony\View\ContentView\isEmbed
isEmbed()
Is the view an embed or not.
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:109
eZ\Publish\Core\MVC\Symfony\View\ContentView\setIsEmbed
setIsEmbed($value)
Sets the value as embed / not embed.
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:99
eZ\Publish\Core\MVC\Symfony\View\ContentView\getLocation
getLocation()
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:79
eZ\Publish\Core\MVC\Symfony\View\ContentView\getContent
getContent()
Returns the Content.
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:63
eZ\Publish\Core\MVC\Symfony\View\ContentView\getInternalParameters
getInternalParameters()
Override to return internal parameters that will be added to the ones returned by getParameter().
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:84
eZ\Publish\Core\MVC\Symfony\View\ContentView\setLocation
setLocation(Location $location)
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:71
eZ\Publish\Core\MVC\Symfony\View\ContentView\$location
$location
Definition: Publish/Core/MVC/Symfony/View/ContentView.php:45
eZ\Publish\Core\MVC\Symfony\View\CachableView
A view that can be cached over HTTP.
Definition: CachableView.php:15
eZ\Publish\Core\MVC\Symfony\View\ContentValueView
A view that contains a Content.
Definition: ContentValueView.php:13
eZ\Publish\Core\MVC\Symfony\View\EmbedView
A view that can embedded into another element.
Definition: EmbedView.php:13
eZ\Publish\Core\MVC\Symfony\View\LocationValueView
Definition: LocationValueView.php:10
eZ\Publish\Core\MVC\Symfony\View\View
Main interface for Views of Value objects (content, block...).
Definition: Publish/Core/MVC/Symfony/View/View.php:16
eZ\Publish\Core\MVC\Symfony\View
Definition: BaseView.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.