TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ViewInterface Interface Reference
Inheritance diagram for ViewInterface:
BackendTemplateView AbstractView EmptyView AbstractTemplateView JsonView NotFoundView JsonView AbstractJsonView StandaloneView FormView ActivateLanguageJson DeactivateLanguageJson GetTranslationsJson RemoveLanguageJson 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)
 
 render ()
 
 initializeView ()
 

Detailed Description

Interface of a view

Definition at line 22 of file ViewInterface.php.

Member Function Documentation

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 BackendTemplateView, AbstractView, and EmptyView.

Referenced by PermissionController\initializeView(), and UsernamePasswordLoginProvider\render().

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 BackendTemplateView, AbstractView, and EmptyView.

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 AbstractView, and EmptyView.

initializeView ( )

Initializes this view.

Returns
void

Implemented in BackendTemplateView, EmptyView, AbstractView, and AbstractTemplateView.

render ( )

Renders the view

Returns
string The rendered view

Implemented in EmptyView, AbstractJsonView, NotFoundView, and JsonView.

Referenced by FormView\renderRenderable().

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 AbstractView, and EmptyView.