Class

eZ\Publish\Core\MVC\Symfony\View\BlockView

class BlockView extends BaseView implements View, BlockValueView, CachableView

Methods

__construct($templateIdentifier = null, array $parameters = array())

setParameters(array $parameters)

from BaseView
addParameters(array $parameters)

Adds a hash of parameters to the existing parameters.

from BaseView
array getParameters()

from BaseView
bool hasParameter(string $parameterName)

Checks if $parameterName exists.

from BaseView
mixed getParameter(string $parameterName)

Returns parameter value by $parameterName.

from BaseView
setTemplateIdentifier(string|Closure $templateIdentifier)

from BaseView
string|Closure getTemplateIdentifier()

from BaseView
setConfigHash(array $config)

Injects the config hash that was used to match and generate the current view.

from BaseView
array|null getConfigHash()

Returns the config hash.

from BaseView
setViewType($viewType)

from BaseView
getViewType()

from BaseView
setControllerReference(ControllerReference $controllerReference)

from BaseView
ControllerReference getControllerReference()

from BaseView
setResponse(Response $response)

Sets a pre-configured Response that will be used to render the View.

from BaseView
Response|null getResponse()

Returns the pre-configured Response.

from BaseView
setCacheEnabled($cacheEnabled)

from BaseView
isCacheEnabled()

from BaseView
setBlock(Block $block)

Block getBlock()

Returns the Content.

Details

at line 16
public __construct($templateIdentifier = null, array $parameters = array())

Parameters

$templateIdentifier
array $parameters

Exceptions

InvalidArgumentType

in BaseView at line 62
public setParameters(array $parameters)

Parameters

array $parameters Hash of parameters to pass to the template/closure

in BaseView at line 72
public addParameters(array $parameters)

Adds a hash of parameters to the existing parameters.

Parameters

array $parameters

in BaseView at line 80
public array getParameters()

Return Value

array

in BaseView at line 92
public bool hasParameter(string $parameterName)

Checks if $parameterName exists.

Parameters

string $parameterName

Return Value

bool

in BaseView at line 107
public mixed getParameter(string $parameterName)

Returns parameter value by $parameterName.

Throws an \InvalidArgumentException if $parameterName is not set.

Parameters

string $parameterName

Return Value

mixed

Exceptions

InvalidArgumentException

in BaseView at line 121
public setTemplateIdentifier(string|Closure $templateIdentifier)

Parameters

string|Closure $templateIdentifier

Exceptions

InvalidArgumentType

in BaseView at line 133
public string|Closure getTemplateIdentifier()

Return Value

string|Closure

in BaseView at line 147
public setConfigHash(array $config)

Injects the config hash that was used to match and generate the current view.

Typically, the hash would have as keys: - template : The template that has been matched - match : The matching configuration, including the matcher "identifier" and what has been passed to it. - matcher : The matcher object.

Parameters

array $config

in BaseView at line 157
public array|null getConfigHash()

Returns the config hash.

Return Value

array|null

in BaseView at line 162
public setViewType($viewType)

Parameters

$viewType

in BaseView at line 167
public getViewType()

in BaseView at line 172
public setControllerReference(ControllerReference $controllerReference)

Parameters

ControllerReference $controllerReference

in BaseView at line 180
public ControllerReference getControllerReference()

Return Value

ControllerReference

in BaseView at line 195
public setResponse(Response $response)

Sets a pre-configured Response that will be used to render the View.

Parameters

Response $response

in BaseView at line 200
public Response|null getResponse()

Returns the pre-configured Response.

Return Value

Response|null

in BaseView at line 205
public setCacheEnabled($cacheEnabled)

Parameters

$cacheEnabled

in BaseView at line 210
public isCacheEnabled()

at line 24
public setBlock(Block $block)

Parameters

Block $block

at line 34
public Block getBlock()

Returns the Content.

Return Value

Block