TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Mvc\View\AbstractView Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\View\AbstractView:
TYPO3\CMS\Extbase\Mvc\View\ViewInterface 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_NotFoundView TYPO3\CMS\Lang\View\Language\UpdateTranslationJson

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)
 
 initializeView ()
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Mvc\View\ViewInterface
 render ()
 

Protected Attributes

 $controllerContext
 
 $variables = array()
 

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! An abstract View

Definition at line 21 of file AbstractView.php.

Member Function Documentation

◆ assign()

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

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

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

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 56 of file AbstractView.php.

Referenced by TYPO3\CMS\Extbase\Mvc\View\AbstractView\assignMultiple().

◆ assignMultiple()

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

Add multiple variables to $this->viewData.

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

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 68 of file AbstractView.php.

References TYPO3\CMS\Extbase\Mvc\View\AbstractView\assign().

◆ canRender()

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

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

By default we assume that the view implementation can handle all kinds of contexts. Override this method if that is not the case.

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

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 85 of file AbstractView.php.

◆ initializeView()

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

Initializes this view.

Override this method for initializing your concrete view implementation.

Returns
void

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 97 of file AbstractView.php.

◆ setControllerContext()

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

Sets the current controller context

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

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 43 of file AbstractView.php.

References TYPO3\CMS\Extbase\Mvc\View\AbstractView\$controllerContext.

Member Data Documentation

◆ $controllerContext

TYPO3\CMS\Extbase\Mvc\View\AbstractView::$controllerContext
protected

◆ $variables

TYPO3\CMS\Extbase\Mvc\View\AbstractView::$variables = array()
protected

Definition at line 35 of file AbstractView.php.

Referenced by TYPO3\CMS\Install\View\JsonView\render().