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

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
eZ\Publish\Core\MVC\Symfony\View\ContentView Class Reference

Main object to be rendered by the View Manager when viewing a content. More...

Inheritance diagram for eZ\Publish\Core\MVC\Symfony\View\ContentView:

## Public Member Functions
| setContent (Content $content)
| getContent ()
| Returns the Content. More...
| setLocation (Location $location)
| getLocation ()
| setIsEmbed ($value)
| Sets the value as embed / not embed. More...
| isEmbed ()
| Is the view an embed or not. More...
Public Member Functions inherited from eZ\Publish\Core\MVC\Symfony\View\BaseView
| __construct ($templateIdentifier=null, array $parameters=[], $viewType='full')
| setParameters (array $parameters)
| addParameters (array $parameters)
| Adds a hash of parameters to the existing parameters. More...
| getParameters ()
| hasParameter ($parameterName)
| Checks if $parameterName exists. More...
| getParameter ($parameterName)
| Returns parameter value by $parameterName. More...
| setTemplateIdentifier ($templateIdentifier)
| getTemplateIdentifier ()
| setConfigHash (array $config)
| Injects the config hash that was used to match and generate the current view. More...
| getConfigHash ()
| Returns the config hash. More...
| setViewType ($viewType)
| getViewType ()
| setControllerReference (ControllerReference $controllerReference)
| getControllerReference ()
| setResponse (Response $response)
| Sets a pre-configured Response that will be used to render the View. More...
| getResponse ()
| Returns the pre-configured Response. More...
| setCacheEnabled ($cacheEnabled)
| isCacheEnabled ()
Public Member Functions inherited from eZ\Publish\Core\MVC\Symfony\View\CachableView
| setCacheEnabled ($cacheEnabled)
| Sets the cache as enabled/disabled. More...
| isCacheEnabled ()
| Indicates if cache is enabled or not. More...

## Protected Member Functions
| getInternalParameters ()
| Override to return internal parameters that will be added to the ones returned by getParameter(). More...

## Private Attributes
| $content
| $location
| $isEmbed = false

## Additional Inherited Members
Public Attributes inherited from eZ\Publish\Core\MVC\Symfony\View\EmbedView
const | DEFAULT_VIEW_TYPE = 'embed'
Protected Attributes inherited from eZ\Publish\Core\MVC\Symfony\View\BaseView
| $templateIdentifier
| $parameters = []
| $configHash = []

## Detailed Description

Main object to be rendered by the View Manager when viewing a content.

Holds the path to the template to be rendered by the view manager and the parameters to inject in it.

The template path can be a closure. In that case, the view manager will invoke it instead of loading a template. $parameters will be passed to the callable in addition to the Content or Location object (depending on the context). The prototype of the closure must be : `namespace Foo; use eZ\Publish\API\Repository\Values\Content\ContentInfo; use eZ\Publish\API\Repository\Values\Content\Location;`

`// For a content function ( ContentInfo $contentInfo, array $parameters = array() ) { // Do something to render // Must return a string to display }`

`// For a location function ( Location $location, array $parameters = array() ) { // Do something to render // Must return a string to display }`

Definition at line 39 of file Publish/Core/MVC/Symfony/View/ContentView.php.

## Member Function Documentation

## ◆ getContent()

eZ\Publish\Core\MVC\Symfony\View\ContentView::getContent | ( |  | ) |

Returns the Content.

Returns
  \eZ\Publish\API\Repository\Values\Content\Content

Implements eZ\Publish\Core\MVC\Symfony\View\ContentValueView.

Definition at line 63 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\$content.

Referenced by eZ\Publish\Core\QueryType\QueryParameterContentViewQueryTypeMapper\evaluateExpression().

## ◆ getInternalParameters()

eZ\Publish\Core\MVC\Symfony\View\ContentView::getInternalParameters | ( |  | ) |
| protected

Override to return internal parameters that will be added to the ones returned by getParameter().

Returns
  array

Reimplemented from eZ\Publish\Core\MVC\Symfony\View\BaseView.

Definition at line 84 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\$content, eZ\Publish\Core\MVC\Symfony\View\ContentView\$location, and eZ\Publish\Core\MVC\Symfony\View\BaseView\$parameters.

## ◆ getLocation()

eZ\Publish\Core\MVC\Symfony\View\ContentView::getLocation | ( |  | ) |

Returns
  \eZ\Publish\API\Repository\Values\Content\Location|null

Implements eZ\Publish\Core\MVC\Symfony\View\LocationValueView.

Definition at line 79 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\$location.

Referenced by eZ\Publish\Core\QueryType\QueryParameterContentViewQueryTypeMapper\evaluateExpression().

## ◆ isEmbed()

eZ\Publish\Core\MVC\Symfony\View\ContentView::isEmbed | ( |  | ) |

Is the view an embed or not.

Returns
  bool True if the view is an embed, false if it is not.

Implements eZ\Publish\Core\MVC\Symfony\View\EmbedView.

Definition at line 109 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\$isEmbed.

Referenced by eZ\Publish\Core\MVC\Symfony\View\ContentView\setIsEmbed().

## ◆ setContent()

eZ\Publish\Core\MVC\Symfony\View\ContentView::setContent | ( | Content | $content | ) |

Parameters

  \eZ\Publish\API\Repository\Values\Content\Content | $content |

Definition at line 53 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\$content.

## ◆ setIsEmbed()

eZ\Publish\Core\MVC\Symfony\View\ContentView::setIsEmbed | ( |  | $value | ) |

Sets the value as embed / not embed.

Parameters

  bool | $value |

Implements eZ\Publish\Core\MVC\Symfony\View\EmbedView.

Definition at line 99 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\isEmbed().

## ◆ setLocation()

eZ\Publish\Core\MVC\Symfony\View\ContentView::setLocation | ( | Location | $location | ) |

Parameters

  \eZ\Publish\API\Repository\Values\Content\Location | $location |

Definition at line 71 of file Publish/Core/MVC/Symfony/View/ContentView.php.

References eZ\Publish\Core\MVC\Symfony\View\ContentView\$location.

## Member Data Documentation

## ◆ $content

eZ\Publish\Core\MVC\Symfony\View\ContentView::$content
| private

Definition at line 42 of file Publish/Core/MVC/Symfony/View/ContentView.php.

Referenced by eZ\Publish\Core\MVC\Symfony\View\ContentView\getContent(), eZ\Publish\Core\MVC\Symfony\View\ContentView\getInternalParameters(), and eZ\Publish\Core\MVC\Symfony\View\ContentView\setContent().

## ◆ $isEmbed

eZ\Publish\Core\MVC\Symfony\View\ContentView::$isEmbed = false
| private

Definition at line 48 of file Publish/Core/MVC/Symfony/View/ContentView.php.

Referenced by eZ\Publish\Core\MVC\Symfony\View\ContentView\isEmbed().

## ◆ $location

eZ\Publish\Core\MVC\Symfony\View\ContentView::$location
| private

Definition at line 45 of file Publish/Core/MVC/Symfony/View/ContentView.php.

Referenced by eZ\Publish\Core\MVC\Symfony\View\ContentView\getInternalParameters(), eZ\Publish\Core\MVC\Symfony\View\ContentView\getLocation(), and eZ\Publish\Core\MVC\Symfony\View\ContentView\setLocation().

The documentation for this class was generated from the following file:

- Publish/Core/MVC/Symfony/View/ContentView.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.