Exemplo n.º 1
0
 /**
  * Pass the arguments of the widget to the subrequest.
  *
  * @param \TYPO3\Fluid\Core\Widget\WidgetRequest $subRequest
  * @return void
  */
 private function passArgumentsToSubRequest(\TYPO3\Fluid\Core\Widget\WidgetRequest $subRequest)
 {
     $arguments = $this->controllerContext->getRequest()->getArguments();
     $widgetIdentifier = $this->widgetContext->getWidgetIdentifier();
     if (isset($arguments[$widgetIdentifier])) {
         if (isset($arguments[$widgetIdentifier]['action'])) {
             $subRequest->setControllerActionName($arguments[$widgetIdentifier]['action']);
             unset($arguments[$widgetIdentifier]['action']);
         }
         $subRequest->setArguments($arguments[$widgetIdentifier]);
     }
 }
 /**
  * Pass the arguments of the widget to the subrequest.
  *
  * @param \TYPO3\Flow\Mvc\ActionRequest $subRequest
  * @return void
  */
 private function passArgumentsToSubRequest(\TYPO3\Flow\Mvc\ActionRequest $subRequest)
 {
     $arguments = $this->controllerContext->getRequest()->getPluginArguments();
     $widgetIdentifier = $this->widgetContext->getWidgetIdentifier();
     $controllerActionName = 'index';
     if (isset($arguments[$widgetIdentifier])) {
         if (isset($arguments[$widgetIdentifier]['@action'])) {
             $controllerActionName = $arguments[$widgetIdentifier]['@action'];
             unset($arguments[$widgetIdentifier]['@action']);
         }
         $subRequest->setArguments($arguments[$widgetIdentifier]);
     }
     $subRequest->setControllerActionName($controllerActionName);
 }
 /**
  * @test
  */
 public function widgetIdentifierCanBeReadAgain()
 {
     $this->widgetContext->setWidgetIdentifier('myWidgetIdentifier');
     $this->assertEquals('myWidgetIdentifier', $this->widgetContext->getWidgetIdentifier());
 }
Exemplo n.º 4
0
 /**
  * Returns the unique URI namespace for this widget in the format pluginNamespace[widgetIdentifier]
  *
  * @return string
  */
 public function getArgumentPrefix()
 {
     return $this->widgetContext->getParentPluginNamespace() . '[' . $this->widgetContext->getWidgetIdentifier() . ']';
 }