PHP Класс eZ\Publish\Core\MVC\Symfony\Event\PreContentViewEvent

To do this, get the ContentView object and add it what you need as params :. $contentView = $event->getContentView(); Returns the location when applicable (viewing a location basically) if ( $contentView->hasParameter( 'location' ) ) $location = $contentView->getParameter( 'location' ); Content is always available. $content = $contentView->getParameter( 'content' ); Set your own variables that will be exposed in the template The following will expose "foo" and "complex" variables in the view template. $contentView->addParameters( array( 'foo' => 'bar', 'complex' => $someObject ) );
Наследование: extends Symfony\Component\EventDispatcher\Event
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( eZ\Publish\Core\MVC\Symfony\View\View $contentView )
getContentView ( ) : eZ\Publish\Core\MVC\Symfony\View\View

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

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

public __construct ( eZ\Publish\Core\MVC\Symfony\View\View $contentView )
$contentView eZ\Publish\Core\MVC\Symfony\View\View

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

public getContentView ( ) : eZ\Publish\Core\MVC\Symfony\View\View
Результат eZ\Publish\Core\MVC\Symfony\View\View