TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Mvc\View\ViewInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\View\ViewInterface:
Tx_Extbase_MVC_View_ViewInterface TYPO3\CMS\Extbase\Mvc\View\AbstractView TYPO3\CMS\Extbase\Mvc\View\EmptyView TYPO3\CMS\Fluid\View\AbstractTemplateView Tx_Extbase_MVC_View_AbstractView TYPO3\CMS\Extbase\Mvc\View\JsonView TYPO3\CMS\Extbase\Mvc\View\NotFoundView TYPO3\CMS\Install\View\FailsafeView TYPO3\CMS\Install\View\JsonView TYPO3\CMS\Lang\View\Language\CheckTranslationJson Tx_Extbase_MVC_View_EmptyView Tx_Fluid_View_AbstractTemplateView TYPO3\CMS\Fluid\View\StandaloneView TYPO3\CMS\Fluid\View\TemplateView

Public Member Functions

 setControllerContext (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 assign ($key, $value)
 
 assignMultiple (array $values)
 
 canRender (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 render ()
 
 initializeView ()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Interface of a view

Definition at line 21 of file ViewInterface.php.

Member Function Documentation

◆ assign()

TYPO3\CMS\Extbase\Mvc\View\ViewInterface::assign (   $key,
  $value 
)

Add a variable to the view data collection. Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible

Parameters
string$keyKey of variable
mixed$valueValue of object
Returns
an instance of $this, to enable chaining

Implemented in TYPO3\CMS\Fluid\View\AbstractTemplateView, TYPO3\CMS\Extbase\Mvc\View\AbstractView, and TYPO3\CMS\Extbase\Mvc\View\EmptyView.

◆ assignMultiple()

TYPO3\CMS\Extbase\Mvc\View\ViewInterface::assignMultiple ( array  $values)

Add multiple variables to the view data collection

Parameters
array$valuesarray in the format array(key1 => value1, key2 => value2)
Returns
an instance of $this, to enable chaining

Implemented in TYPO3\CMS\Fluid\View\AbstractTemplateView, TYPO3\CMS\Extbase\Mvc\View\AbstractView, and TYPO3\CMS\Extbase\Mvc\View\EmptyView.

◆ canRender()

TYPO3\CMS\Extbase\Mvc\View\ViewInterface::canRender ( \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext  $controllerContext)

Tells if the view implementation can render the view for the given context.

Parameters
\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext$controllerContext
Returns
boolean TRUE if the view has something useful to display, otherwise FALSE

Implemented in TYPO3\CMS\Extbase\Mvc\View\AbstractView, and TYPO3\CMS\Extbase\Mvc\View\EmptyView.

◆ initializeView()

TYPO3\CMS\Extbase\Mvc\View\ViewInterface::initializeView ( )

◆ render()

◆ setControllerContext()

TYPO3\CMS\Extbase\Mvc\View\ViewInterface::setControllerContext ( \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext  $controllerContext)

Sets the current controller context

Parameters
\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext$controllerContext
Returns
void

Implemented in TYPO3\CMS\Extbase\Mvc\View\AbstractView, and TYPO3\CMS\Extbase\Mvc\View\EmptyView.