Neos\FluidAdaptor\Core\Widget\WidgetContext::getWidgetIdentifier PHP Method

getWidgetIdentifier() public method

public getWidgetIdentifier ( ) : string
return string
    public function getWidgetIdentifier()
    {
        return $this->widgetIdentifier;
    }

Usage Example

 /**
  * Pass the arguments of the widget to the sub request.
  *
  * @param ActionRequest $subRequest
  * @return void
  */
 private function passArgumentsToSubRequest(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]);
     }
     if ($subRequest->getControllerActionName() === null) {
         $subRequest->setControllerActionName($controllerActionName);
     }
 }
All Usage Examples Of Neos\FluidAdaptor\Core\Widget\WidgetContext::getWidgetIdentifier