getControllerActionName() public method

Returns the name of the action the controller is supposed to execute.
public getControllerActionName ( ) : string
return string Action name
 /**
  * Determines the action method and assures that the method exists.
  *
  * @return string The action method name
  * @throws NoSuchActionException if the action specified in the request object does not exist (and if there's no default action either).
  */
 protected function resolveActionMethodName()
 {
     if ($this->request->getControllerActionName() === 'index') {
         $actionName = 'index';
         switch ($this->request->getHttpRequest()->getMethod()) {
             case 'HEAD':
             case 'GET':
                 $actionName = $this->request->hasArgument($this->resourceArgumentName) ? 'show' : 'list';
                 break;
             case 'POST':
                 $actionName = 'create';
                 break;
             case 'PUT':
                 if (!$this->request->hasArgument($this->resourceArgumentName)) {
                     $this->throwStatus(400, null, 'No resource specified');
                 }
                 $actionName = 'update';
                 break;
             case 'DELETE':
                 if (!$this->request->hasArgument($this->resourceArgumentName)) {
                     $this->throwStatus(400, null, 'No resource specified');
                 }
                 $actionName = 'delete';
                 break;
         }
         $this->request->setControllerActionName($actionName);
     }
     return parent::resolveActionMethodName();
 }
 /**
  * Redirects the request to another action and / or controller.
  *
  * Redirect will be sent to the client which then performs another request to the new URI.
  *
  * NOTE: This method only supports web requests and will throw an exception
  * if used with other request types.
  *
  * @param ActionRequest $request The request to redirect to
  * @param integer $delay (optional) The delay in seconds. Default is no delay.
  * @param integer $statusCode (optional) The HTTP status code for the redirect. Default is "303 See Other"
  * @return void
  * @throws StopActionException
  * @see forwardToRequest()
  * @api
  */
 protected function redirectToRequest(ActionRequest $request, $delay = 0, $statusCode = 303)
 {
     $packageKey = $request->getControllerPackageKey();
     $subpackageKey = $request->getControllerSubpackageKey();
     if ($subpackageKey !== null) {
         $packageKey .= '\\' . $subpackageKey;
     }
     $this->redirect($request->getControllerActionName(), $request->getControllerName(), $packageKey, $request->getArguments(), $delay, $statusCode, $request->getFormat());
 }
 /**
  * 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);
     }
 }
 /**
  * Set the default controller and action names if none has been specified.
  *
  * @param ActionRequest $actionRequest
  * @return void
  */
 protected function setDefaultControllerAndActionNameIfNoneSpecified(ActionRequest $actionRequest)
 {
     if ($actionRequest->getControllerName() === null) {
         $actionRequest->setControllerName('Standard');
     }
     if ($actionRequest->getControllerActionName() === null) {
         $actionRequest->setControllerActionName('index');
     }
 }