PHP 클래스 Neos\Flow\Mvc\View\AbstractView

상속: implements Neos\Flow\Mvc\View\ViewInterface
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
$options array The configuration options of this view
$supportedOptions array Syntax example: array( 'someOptionName' => array('defaultValue', 'some description', 'string'), 'someOtherOptionName' => array('defaultValue', some description', integer), ... )
$variables array View variables and their values

공개 메소드들

메소드 설명
__construct ( array $options = [] ) Set default options based on the supportedOptions provided
assign ( string $key, mixed $value ) : AbstractView Add a variable to $this->variables.
assignMultiple ( array $values ) : AbstractView Add multiple variables to $this->variables.
canRender ( ControllerContext $controllerContext ) : boolean Tells if the view implementation can render the view for the given context.
createWithOptions ( array $options ) : Neos\Flow\Mvc\View\ViewInterface Factory method to create an instance with given options.
getOption ( string $optionName ) : mixed Get a specific option of this View
setControllerContext ( ControllerContext $controllerContext ) : void Sets the current controller context
setOption ( string $optionName, mixed $value ) : void Set a specific option of this View

메소드 상세

__construct() 공개 메소드

Set default options based on the supportedOptions provided
public __construct ( array $options = [] )
$options array

assign() 공개 메소드

Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
public assign ( string $key, mixed $value ) : AbstractView
$key string Key of variable
$value mixed Value of object
리턴 AbstractView an instance of $this, to enable chaining

assignMultiple() 공개 메소드

Add multiple variables to $this->variables.
public assignMultiple ( array $values ) : AbstractView
$values array array in the format array(key1 => value1, key2 => value2)
리턴 AbstractView an instance of $this, to enable chaining

canRender() 공개 메소드

By default we assume that the view implementation can handle all kinds of contexts. Override this method if that is not the case.
public canRender ( ControllerContext $controllerContext ) : boolean
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
리턴 boolean TRUE if the view has something useful to display, otherwise FALSE

createWithOptions() 공개 정적인 메소드

Factory method to create an instance with given options.
public static createWithOptions ( array $options ) : Neos\Flow\Mvc\View\ViewInterface
$options array
리턴 Neos\Flow\Mvc\View\ViewInterface

getOption() 공개 메소드

Get a specific option of this View
public getOption ( string $optionName ) : mixed
$optionName string
리턴 mixed

setControllerContext() 공개 메소드

Sets the current controller context
public setControllerContext ( ControllerContext $controllerContext ) : void
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
리턴 void

setOption() 공개 메소드

Set a specific option of this View
public setOption ( string $optionName, mixed $value ) : void
$optionName string
$value mixed
리턴 void

프로퍼티 상세

$controllerContext 보호되어 있는 프로퍼티

protected ControllerContext,Neos\Flow\Mvc\Controller $controllerContext
리턴 Neos\Flow\Mvc\Controller\ControllerContext

$options 보호되어 있는 프로퍼티

The configuration options of this view
protected array $options
리턴 array

$supportedOptions 보호되어 있는 프로퍼티

Syntax example: array( 'someOptionName' => array('defaultValue', 'some description', 'string'), 'someOtherOptionName' => array('defaultValue', some description', integer), ... )
protected array $supportedOptions
리턴 array

$variables 보호되어 있는 프로퍼티

View variables and their values
또한 보기: assign()
protected array $variables
리턴 array