TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
AbstractView Class Reference
Inheritance diagram for AbstractView:
ViewInterface JsonView NotFoundView FailsafeView JsonView AbstractJsonView ActivateLanguageJson DeactivateLanguageJson GetTranslationsJson UpdateLanguageJson 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 ViewInterface
 render ()
 

Protected Attributes

 $controllerContext
 
 $variables = array()
 

Detailed Description

An abstract View

Definition at line 22 of file AbstractView.php.

Member Function Documentation

assign (   $key,
  $value 
)

Add a variable to $this->viewData. 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

Implements ViewInterface.

Definition at line 58 of file AbstractView.php.

Referenced by AbstractView\assignMultiple().

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

Definition at line 71 of file AbstractView.php.

References AbstractView\assign().

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
bool TRUE if the view has something useful to display, otherwise FALSE

Implements ViewInterface.

Definition at line 89 of file AbstractView.php.

initializeView ( )

Initializes this view.

Override this method for initializing your concrete view implementation.

Returns
void

Implements ViewInterface.

Definition at line 102 of file AbstractView.php.

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

Sets the current controller context

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

Implements ViewInterface.

Definition at line 44 of file AbstractView.php.

References AbstractView\$controllerContext.

Member Data Documentation

$controllerContext
protected

Definition at line 28 of file AbstractView.php.

Referenced by AbstractView\setControllerContext().

$variables = array()
protected

Definition at line 36 of file AbstractView.php.

Referenced by JsonView\render().