PHP Class eZ\Publish\Core\MVC\Symfony\Controller\PageController

Since: 6.0.0 All methods except `viewAction()` are deprecated and will be removed in the future.
Inheritance: extends Controller
Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$pageService eZ\Publish\Core\FieldType\Page\PageService

Public Methods

Method Description
__construct ( Manager $viewManager, PageService $pageService )
viewAction ( eZ\Publish\Core\MVC\Symfony\View\BlockView $view ) : eZ\Publish\Core\MVC\Symfony\View\BlockView This is the default view action for a BlockView object.
viewBlock ( Block $block, array $params = [], array $cacheSettings = [] ) : Response Render the block.
viewBlockById ( mixed $id, array $params = [], array $cacheSettings = [] ) : Response Renders the block with given $id.

Method Details

__construct() public method

public __construct ( Manager $viewManager, PageService $pageService )
$viewManager eZ\Publish\Core\MVC\Symfony\View\Manager
$pageService eZ\Publish\Core\FieldType\Page\PageService

viewAction() public method

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 block_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 BlockCacheResponseListener.
public viewAction ( eZ\Publish\Core\MVC\Symfony\View\BlockView $view ) : eZ\Publish\Core\MVC\Symfony\View\BlockView
$view eZ\Publish\Core\MVC\Symfony\View\BlockView
return eZ\Publish\Core\MVC\Symfony\View\BlockView

viewBlock() public method

Render the block.
public viewBlock ( Block $block, array $params = [], array $cacheSettings = [] ) : Response
$block eZ\Publish\Core\FieldType\Page\Parts\Block
$params array
$cacheSettings array settings for the HTTP cache, 'smax-age' and 'max-age' are checked.
return Symfony\Component\HttpFoundation\Response

viewBlockById() public method

This method can be used with ESI rendering strategy.
public viewBlockById ( mixed $id, array $params = [], array $cacheSettings = [] ) : Response
$id mixed Block id
$params array
$cacheSettings array settings for the HTTP cache, 'smax-age' and 'max-age' are checked.
return Symfony\Component\HttpFoundation\Response

Property Details

$pageService protected property

protected PageService,eZ\Publish\Core\FieldType\Page $pageService
return eZ\Publish\Core\FieldType\Page\PageService