TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
 get ($ajaxWidgetId)
 
 store (\TYPO3\CMS\Fluid\Core\Widget\WidgetContext $widgetContext)
 

Protected Member Functions

 loadWidgetContexts ()
 
 storeWidgetContexts ()
 

Protected Attributes

 $widgetContexts = []
 
 $widgetContextsStorageKey = 'TYPO3\\CMS\\Fluid\\Core\\Widget\\AjaxWidgetContextHolder_widgetContexts'
 

Detailed Description

This object stores the WidgetContext for the currently active widgets of the current user, to make sure the WidgetContext is available in Widget AJAX requests.

This class is only used internally by the widget framework.

Definition at line 30 of file AjaxWidgetContextHolder.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::__construct ( )

Member Function Documentation

◆ get()

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::get (   $ajaxWidgetId)

Get the widget context for the given $ajaxWidgetId.

Parameters
string$ajaxWidgetId
Returns

Definition at line 74 of file AjaxWidgetContextHolder.php.

◆ loadWidgetContexts()

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::loadWidgetContexts ( )
protected

Loads the windget contexts from the TYPO3 user session

Returns
void

Definition at line 58 of file AjaxWidgetContextHolder.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder\__construct().

◆ store()

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::store ( \TYPO3\CMS\Fluid\Core\Widget\WidgetContext  $widgetContext)

Stores the WidgetContext inside the Context, and sets the AjaxWidgetIdentifier inside the Widget Context correctly.

Parameters
\TYPO3\CMS\Fluid\Core\Widget\WidgetContext$widgetContext
Returns
void

Definition at line 89 of file AjaxWidgetContextHolder.php.

References TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder\storeWidgetContexts().

◆ storeWidgetContexts()

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::storeWidgetContexts ( )
protected

Persists the widget contexts in the TYPO3 user session

Returns
void

Definition at line 102 of file AjaxWidgetContextHolder.php.

References $GLOBALS, and TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder\$widgetContextsStorageKey.

Referenced by TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder\store().

Member Data Documentation

◆ $widgetContexts

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::$widgetContexts = []
protected

Definition at line 38 of file AjaxWidgetContextHolder.php.

◆ $widgetContextsStorageKey

TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::$widgetContextsStorageKey = 'TYPO3\\CMS\\Fluid\\Core\\Widget\\AjaxWidgetContextHolder_widgetContexts'
protected