eZPublishCommunityProject  2013.6
eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator Class Reference
+ Inheritance diagram for eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator:
+ Collaboration diagram for eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator:

Public Member Functions

 __construct (Twig_Environment $twig, array $options, ConfigResolverInterface $resolver)
 
 addParameters (array $parameters)
 Adds a hash of parameters to the existing parameters. More...
 
 getParameter ($parameterName)
 Returns parameter value by $parameterName. More...
 
 getParameters ()
 Returns registered parameters. More...
 
 getTemplateIdentifier ()
 Returns the registered template identifier. More...
 
 hasParameter ($parameterName)
 Checks if $parameterName exists. More...
 
 setContentView (ContentView $contentView)
 Injects the content view object to decorate. More...
 
 setParameters (array $parameters)
 Sets $parameters that will later be injected to the template/closure. More...
 
 setTemplateIdentifier ($templateIdentifier)
 Sets $templateIdentifier to the content view. More...
 

Protected Attributes

 $contentView
 
 $options
 
 $twig
 

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::__construct ( Twig_Environment  $twig,
array  $options,
ConfigResolverInterface  $resolver 
)

Member Function Documentation

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::addParameters ( array  $parameters)

Adds a hash of parameters to the existing parameters.

Parameters
array$parameters

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::getParameter (   $parameterName)

Returns parameter value by $parameterName.

Throws an if $parameterName is not set.

Parameters
string$parameterName
Exceptions
\InvalidArgumentException
Returns
mixed

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::getParameters ( )

Returns registered parameters.

Returns
array

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::getTemplateIdentifier ( )

Returns the registered template identifier.

Exceptions
\RuntimeException
Returns

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::hasParameter (   $parameterName)

Checks if $parameterName exists.

Parameters
string$parameterName
Returns
boolean

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::setContentView ( ContentView  $contentView)

Injects the content view object to decorate.

Parameters
\eZ\Publish\Core\MVC\Symfony\View\ContentView$contentView
eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::setParameters ( array  $parameters)

Sets $parameters that will later be injected to the template/closure.

If some parameters were already present, $parameters will replace them.

Parameters
array$parametersHash of parameters

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::setTemplateIdentifier (   $templateIdentifier)

Sets $templateIdentifier to the content view.

This decorator only supports closures.

Must throw a exception if $templateIdentifier is invalid.

Parameters
\Closure$templateIdentifier
Exceptions
\eZ\Publish\Core\Base\Exceptions\InvalidArgumentType

Implements eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface.

Member Data Documentation

eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::$contentView
protected
eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator::$options
protected

The documentation for this class was generated from the following file: