2 namespace TYPO3\CMS\Fluid\Core\Widget;
60 if (TYPO3_MODE ===
'FE') {
61 $this->widgetContexts = unserialize(
$GLOBALS[
'TSFE']->fe_user->getKey(
'ses', $this->widgetContextsStorageKey));
63 $this->widgetContexts = unserialize(
$GLOBALS[
'BE_USER']->uc[$this->widgetContextsStorageKey]);
74 public function get($ajaxWidgetId)
76 if (!isset($this->widgetContexts[$ajaxWidgetId])) {
77 throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetContextNotFoundException(
'No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId .
'". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775);
79 return $this->widgetContexts[$ajaxWidgetId];
91 $ajaxWidgetId = md5(uniqid(mt_rand(),
true));
92 $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId);
93 $this->widgetContexts[$ajaxWidgetId] = $widgetContext;
104 if (TYPO3_MODE ===
'FE') {
105 $GLOBALS[
'TSFE']->fe_user->setKey(
'ses', $this->widgetContextsStorageKey, serialize($this->widgetContexts));
106 $GLOBALS[
'TSFE']->fe_user->storeSessionData();