PHP Класс eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController

С версии: 6.0.0 All methods except `view()` are deprecated and will be removed in the future.
Наследование: extends eZ\Publish\Core\MVC\Symfony\Controller\Controller
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$viewManager eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface

Открытые методы

Метод Описание
__construct ( eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface $viewManager, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker )
embedAction ( ContentView $view ) : ContentView Embed a content.
embedContent ( integer $contentId, string $viewType, boolean $layout = false, array $params = [] ) : Response Main action for viewing embedded content.
embedLocation ( integer $locationId, string $viewType, boolean $layout = false, array $params = [] ) : Response Main action for viewing embedded location.
viewAction ( ContentView $view ) : ContentView This is the default view action or a ContentView object.
viewContent ( integer $contentId, string $viewType, boolean $layout = false, array $params = [] ) : Response Main action for viewing content.
viewLocation ( integer $locationId, string $viewType, boolean $layout = false, array $params = [] ) : Response Main action for viewing content through a location in the repository.

Защищенные методы

Метод Описание
buildResponse ( string | null $etag = null, DateTime $lastModified = null ) : Response Build the response so that depending on settings it's cacheable.
handleViewException ( Response $response, $params, Exception $e, $viewType, $contentId = null, $locationId = null )
performAccessChecks ( ) Performs the access checks.
renderContent ( eZ\Publish\API\Repository\Values\Content\Content $content, string $viewType, boolean $layout = false, array $params = [] ) : string Creates the content to be returned when viewing a Content.
renderLocation ( eZ\Publish\API\Repository\Values\Content\Location $location, string $viewType, boolean $layout = false, array $params = [] ) : string Creates the content to be returned when viewing a Location.

Описание методов

__construct() публичный Метод

public __construct ( eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface $viewManager, Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker )
$viewManager eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface
$authorizationChecker Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface

buildResponse() защищенный Метод

Build the response so that depending on settings it's cacheable.
protected buildResponse ( string | null $etag = null, DateTime $lastModified = null ) : Response
$etag string | null
$lastModified DateTime
Результат Symfony\Component\HttpFoundation\Response

embedAction() публичный Метод

Behaves mostly like viewAction(), but with specific content load permission handling.
public embedAction ( ContentView $view ) : ContentView
$view eZ\Publish\Core\MVC\Symfony\View\ContentView
Результат eZ\Publish\Core\MVC\Symfony\View\ContentView

embedContent() публичный Метод

Response will be cached with HttpCache validation model (Etag).
public embedContent ( integer $contentId, string $viewType, boolean $layout = false, array $params = [] ) : Response
$contentId integer
$viewType string
$layout boolean
$params array
Результат Symfony\Component\HttpFoundation\Response

embedLocation() публичный Метод

Response will be cached with HttpCache validation model (Etag).
Устаревший: Since 6.0.0. Viewing locations is now done with ViewContent.
public embedLocation ( integer $locationId, string $viewType, boolean $layout = false, array $params = [] ) : Response
$locationId integer
$viewType string
$layout boolean
$params array
Результат Symfony\Component\HttpFoundation\Response

handleViewException() защищенный Метод

protected handleViewException ( Response $response, $params, Exception $e, $viewType, $contentId = null, $locationId = null )
$response Symfony\Component\HttpFoundation\Response
$e Exception

performAccessChecks() защищенный Метод

Performs the access checks.
protected performAccessChecks ( )

renderContent() защищенный Метод

Creates the content to be returned when viewing a Content.
protected renderContent ( eZ\Publish\API\Repository\Values\Content\Content $content, string $viewType, boolean $layout = false, array $params = [] ) : string
$content eZ\Publish\API\Repository\Values\Content\Content
$viewType string
$layout boolean
$params array
Результат string

renderLocation() защищенный Метод

Creates the content to be returned when viewing a Location.
protected renderLocation ( eZ\Publish\API\Repository\Values\Content\Location $location, string $viewType, boolean $layout = false, array $params = [] ) : string
$location eZ\Publish\API\Repository\Values\Content\Location
$viewType string
$layout boolean
$params array
Результат string

viewAction() публичный Метод

It doesn't do anything by itself: the returned View object is rendered by the ViewRendererListener into an HttpFoundation Response. This action can be selectively replaced by a custom action by means of content_view configuration. Custom actions can add parameters to the view and customize the Response the View will be converted to. They may also bypass the ViewRenderer by returning an HttpFoundation Response. Cache is in both cases handled by the CacheViewResponseListener.
public viewAction ( ContentView $view ) : ContentView
$view eZ\Publish\Core\MVC\Symfony\View\ContentView
Результат eZ\Publish\Core\MVC\Symfony\View\ContentView

viewContent() публичный Метод

Response will be cached with HttpCache validation model (Etag).
public viewContent ( integer $contentId, string $viewType, boolean $layout = false, array $params = [] ) : Response
$contentId integer
$viewType string
$layout boolean
$params array
Результат Symfony\Component\HttpFoundation\Response

viewLocation() публичный Метод

Response will be cached with HttpCache validation model (Etag).
Устаревший: Since 6.0.0. Viewing locations is now done with ViewContent.
public viewLocation ( integer $locationId, string $viewType, boolean $layout = false, array $params = [] ) : Response
$locationId integer
$viewType string
$layout boolean
$params array
Результат Symfony\Component\HttpFoundation\Response

Описание свойств

$viewManager защищенное свойство

protected ViewManagerInterface,eZ\Publish\Core\MVC\Symfony\View $viewManager
Результат eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface