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
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

공개 메소드들

메소드 설명
__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