TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Install\View\JsonView Class Reference
Inheritance diagram for TYPO3\CMS\Install\View\JsonView:
TYPO3\CMS\Extbase\Mvc\View\AbstractView TYPO3\CMS\Extbase\Mvc\View\ViewInterface

Public Member Functions

 render ()
 
 transformStatusToArray (StatusInterface $status)
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Mvc\View\AbstractView
 setControllerContext (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 assign ($key, $value)
 
 assignMultiple (array $values)
 
 canRender (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 initializeView ()
 

Protected Member Functions

 transformStatusMessagesToArray (array $statusArray=[])
 
 getSeverityAsNumber ($severity)
 

Additional Inherited Members

- Protected Attributes inherited from TYPO3\CMS\Extbase\Mvc\View\AbstractView
 $controllerContext
 
 $variables = []
 

Detailed Description

Simple JsonView (currently returns an associative array)

Definition at line 24 of file JsonView.php.

Member Function Documentation

◆ getSeverityAsNumber()

TYPO3\CMS\Install\View\JsonView::getSeverityAsNumber (   $severity)
protected

Return the corresponding integer value for given severity string

Parameters
string$severity
Returns
int

Definition at line 91 of file JsonView.php.

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

◆ render()

TYPO3\CMS\Extbase\Mvc\View\JsonView::render ( )
Returns
string

Transforms the value view variable to a serializable array representation using a YAML view configuration and JSON encodes the result.

Returns
string The JSON encoded variables

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

Definition at line 29 of file JsonView.php.

References TYPO3\CMS\Extbase\Mvc\View\AbstractView\$variables, and TYPO3\CMS\Install\View\JsonView\transformStatusMessagesToArray().

◆ transformStatusMessagesToArray()

TYPO3\CMS\Install\View\JsonView::transformStatusMessagesToArray ( array  $statusArray = [])
protected

Transform an array of messages to an associative array.

Parameters
array<StatusInterface>
Returns
array
Exceptions
StatusException

Definition at line 53 of file JsonView.php.

References TYPO3\CMS\Install\View\JsonView\transformStatusToArray().

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

◆ transformStatusToArray()

TYPO3\CMS\Install\View\JsonView::transformStatusToArray ( StatusInterface  $status)

Creates an array from a status object. Used for example to transfer the message as json.

Parameters
StatusInterface$status
Returns
array

Definition at line 75 of file JsonView.php.

References TYPO3\CMS\Install\Status\StatusInterface\getMessage(), TYPO3\CMS\Install\Status\StatusInterface\getSeverity(), TYPO3\CMS\Install\View\JsonView\getSeverityAsNumber(), and TYPO3\CMS\Install\Status\StatusInterface\getTitle().

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