TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Mvc\View\ViewInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\View\ViewInterface:
TYPO3\CMS\Backend\View\BackendTemplateView TYPO3\CMS\Extbase\Mvc\View\AbstractView TYPO3\CMS\Extbase\Mvc\View\EmptyView TYPO3\CMS\Fluid\View\AbstractTemplateView 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\AbstractJsonView TYPO3\CMS\Fluid\View\StandaloneView TYPO3\CMS\Fluid\View\TemplateView TYPO3\CMS\Lang\View\Language\ActivateLanguageJson TYPO3\CMS\Lang\View\Language\DeactivateLanguageJson TYPO3\CMS\Lang\View\Language\GetTranslationsJson TYPO3\CMS\Lang\View\Language\UpdateLanguageJson TYPO3\CMS\Lang\View\Language\UpdateTranslationJson TYPO3\CMS\Install\View\StandaloneView TYPO3\CMS\Fluid\Tests\Unit\View\Fixtures\TemplateViewFixture

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

Interface of a view

Definition at line 22 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\Backend\View\BackendTemplateView, TYPO3\CMS\Extbase\Mvc\View\AbstractView, and TYPO3\CMS\Extbase\Mvc\View\EmptyView.

Referenced by TYPO3\CMS\Cshmanual\Controller\HelpController\initializeAction(), and TYPO3\CMS\Beuser\Controller\PermissionController\initializeView().

◆ 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\Backend\View\BackendTemplateView, 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
bool 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()

◆ 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.