/**
  * @test
  */
 public function ajaxWidgetIdentifierCanBeReadAgain()
 {
     $this->widgetContext->setAjaxWidgetIdentifier(42);
     $this->assertEquals(42, $this->widgetContext->getAjaxWidgetIdentifier());
 }
示例#2
0
 /**
  * Stores the WidgetContext inside the Context, and sets the
  * AjaxWidgetIdentifier inside the Widget Context correctly.
  *
  * @param \TYPO3\Fluid\Core\Widget\WidgetContext $widgetContext
  * @return void
  */
 public function store(\TYPO3\Fluid\Core\Widget\WidgetContext $widgetContext)
 {
     $ajaxWidgetId = md5(uniqid(mt_rand(), TRUE));
     $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId);
     $this->widgetContexts[$ajaxWidgetId] = $widgetContext;
     $this->storeWidgetContexts();
 }
 /**
  * Stores the WidgetContext inside the Context, and sets the
  * AjaxWidgetIdentifier inside the Widget Context correctly.
  *
  * @param WidgetContext $widgetContext
  * @return void
  * @Flow\Session(autoStart=true)
  */
 public function store(WidgetContext $widgetContext)
 {
     $ajaxWidgetId = $this->nextFreeAjaxWidgetId++;
     $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId);
     $this->widgetContexts[$ajaxWidgetId] = $widgetContext;
 }