PHP 클래스 eZ\Publish\Core\MVC\Symfony\View\ContentView
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
}
파일 보기
프로젝트 열기: ezsystems/ezpublish-kernel
1 사용 예제들
공개 메소드들
메소드 |
설명 |
|
getContent ( ) : eZ\Publish\API\Repository\Values\Content\Content |
Returns the Content. |
|
getLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location |
|
|
isEmbed ( ) : boolean |
Is the view an embed or not. |
|
setContent ( eZ\Publish\API\Repository\Values\Content\Content $content ) |
|
|
setIsEmbed ( boolean $value ) |
Sets the value as embed / not embed. |
|
setLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) |
|
|
보호된 메소드들
메소드 상세
public getContent ( ) : eZ\Publish\API\Repository\Values\Content\Content |
리턴 |
eZ\Publish\API\Repository\Values\Content\Content |
|
getInternalParameters()
보호된 메소드
public getLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location |
리턴 |
eZ\Publish\API\Repository\Values\Content\Location |
|
Is the view an embed or not.
public setContent ( eZ\Publish\API\Repository\Values\Content\Content $content ) |
$content |
eZ\Publish\API\Repository\Values\Content\Content |
|
Sets the value as embed / not embed.
public setLocation ( eZ\Publish\API\Repository\Values\Content\Location $location ) |
$location |
eZ\Publish\API\Repository\Values\Content\Location |
|