Controller process.

@param   string $action
@param   Data $messages
@param   array $redirect
@param   array $ids
@return  \Cake\Http\Response|null

@throws  \Aura\Intl\Exception
519148
protected function _process($action, Data $messages, array $redirect, array $ids)
    {
        $count = count($ids);
        $defaultMsg = __dn(
            'core',
            'One record success processed',
            '{0} records processed',
            $count,
            sprintf('<strong>%s</strong>', $count)
        );

        EventManager::trigger($this->_getEventName($action, self::EVENT_NAME_AFTER), $this->_controller, [
            'ids' => $ids
        ]);

        $this->Flash->success($messages->get($action, $defaultMsg));
        return $this->_controller->redirect($redirect);
    }
702825
protected function redirectHere($action, $parameters = [])
    {
        $controller = get_class($this);

        return Redirect::action($controller.'@'.$action, $parameters);
    }
672795
protected function receiveMessage(array $queues, int $timeout, int $redeliveryDelay): ?RedisMessage
    {
        $startAt = time();
        $thisTimeout = $timeout;

        if (null === $this->queueNames) {
            $this->queueNames = [];
            foreach ($queues as $queue) {
                $this->queueNames[] = $queue->getName();
            }
        }

        while ($thisTimeout > 0) {
            $this->migrateExpiredMessages($this->queueNames);

            if (false == $result = $this->getContext()->getRedis()->brpop($this->queueNames, $thisTimeout)) {
                return null;
            }

            $this->pushQueueNameBack($result->getKey());

            if ($message = $this->processResult($result, $redeliveryDelay)) {
                return $message;
            }

            $thisTimeout -= time() - $startAt;
        }

        return null;
    }
935512
private function exec( $controller_name, $args )
	{
		// Process controller
		$compo = explode( '@', $controller_name );

		if ( count( $compo ) <= 1 ) {

			throw new Exception( sprintf( 'Controller action must be defined in %s.', $controller_name ) );

		}

		// Get controller
		require_once(  $this->controllers_path . $compo[0] . '.php' );
		$classname = sprintf( $this->namespace . '\Controllers\%s', $compo[0]);
		$controller = new $classname( $this->view );

		if ( !method_exists( $controller, $compo[1] ) ) {

			throw new Exception( sprintf( 'Controller action "%s" not found in %s.', $compo[1], $compo[0] ) );

		}

		return call_user_func_array( [ $controller, $compo[1] ], $args );
	}
115562
public function execute($action, array $parameters = []) {
        $result = null;
        if (is_string($action)) {
            $actionParts = explode("@", $action);
            $controllerClass = $actionParts[0];
            $controllerMethodName = sizeof($actionParts) > 1 ? $actionParts[1] : "index";
            $controller = Controllers::get($controllerClass);
            if ($controller == null) {
                throw new ActionNotFoundException ( "Controller \"$controllerClass\" not found !!");
            }
            if (method_exists($controller, $controllerMethodName)) {
                $controllerMethodParams = $this->getParameterValues(new ReflectionMethod($controller, $controllerMethodName), $parameters);
                $result = call_user_func_array([$controller, $controllerMethodName], $controllerMethodParams);
            }
            else {
                throw new ActionNotFoundException ("Method \"$controllerMethodName\" not found in controller \"$controllerClass\" !!");
            }
        }
        else if (is_callable($action)) {
            $actionParams = $this->getParameterValues(new ReflectionFunction($action), $parameters);
            $result = call_user_func_array($action, $actionParams);
        }
        return $result;
    }
1078031
protected function runActionMethod($action, $vars = array()) {
		return call_user_func_array(
		    array($this, $action),
            $this->getActionArguments($action, $vars)
        );
	}
592415
public function goToAction($action, $params = [])
    {
        return $this->request->goToPage($this->getName(), $action, $params);
    }
977268
public function exec_action($action)
    {
        if (isset($this->actions[$action])) {
            call_user_func($this->actions[$action]);
        }
        else if (rcube::get_instance()->action != 'refresh') {
            rcube::raise_error(array('code' => 524, 'type' => 'php',
                'file' => __FILE__, 'line' => __LINE__,
                'message' => "No handler found for action $action"), true, true);
        }
    }
1263517
public function void(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/void', $id);

        return $this->post($url, $data, $headers);
    }
206656
public function redirectToAction($action, $parameters = array(), $status = 302, $headers = array())
	{
		return $this->redirector->action($action, $parameters, $status, $headers);
	}
835003
public function performAction($action, $data = null) {
        $this->setTokenValue($this->getEntityIdName(), $this->getId());

        $payload = new \stdClass;
        $payload->data = new \stdClass;
        $payload->data->action = $action;
        $payload->data->data = is_null($data) ? new \stdClass : $data;

        $this->put(json_encode($payload));
    }
911088
protected function handleRedirectResponseException(GetResponseForExceptionEvent $event, RedirectResponseException $ex) {
        if (null !== $ex->getRedirectUrl()) {
            $event->setResponse(new RedirectResponse($ex->getRedirectUrl()));
        }
        return $event;
    }
136833
public function create(Redirect &$redirect)
    {
        $endpoint = '/admin/redirects.json';
        $data = $redirect->exportData();
        $response = $this->request(
            $endpoint, "POST", array(
            'redirect' => $data
            )
        );
        $redirect->setData($response['redirect']);
    }
1180443
protected function actionRedirect($action)
    {
        if ($this->redirect)
        {
            return;
        }

        $this->redirect = $action->getAttribute('uri');
        /** @var TAdminUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $this->redirect = $page->replaceMacros($this->redirect);
    }
1089384
public function handleBulkExport($redirectTo, $doaction, $postIds)
    {
        if ($doaction !== 'acfExportManager-export') {
            return $redirectTo;
        }


        foreach ($postIds as $postId) {
            $fieldgroup = acf_get_field_group($postId);

            if (!in_array($fieldgroup['key'], $this->exportPosts)) {
                continue;
            }

            $this->export($fieldgroup, false, false);
        }

        $redirectTo = add_query_arg('bulkExportedFieldgroups', count($postIds), $redirectTo);
        return $redirectTo;
    }
877154
public function execUpdate($redirectAction = false)
    {
        // database translations
        $this->loadTranslations('database', sprintf('private/global/locales/%s/database.ini', LANGUAGE));
        //validate and extract input
        $input = $this->processSaveInput(filter_input_array(INPUT_POST, $this->configuration['subjects'][$this->name]['CRUD']['inputFields']));
        if($input) {
            //extract primary key value
            $primaryKeyValue = $this->extractPrimaryKeyValue($input, 'a');
            try{
                //ORM insert
                $this->purgePrimaryKeyValue($input);
                if($this->update($primaryKeyValue, $input)) {
                    $this->messages->save('cookies','success',sprintf($this->translations[$this->name]['CRUD']['update-success'], $this->translations[$this->name]['singular']));
                }
            } catch(\PDOException $exception) {
                $this->messages->save('cookies', 'danger', $this->handleError($exception));
                if(!isset($redirectAction)) {
                    $redirectAction = 'update-form/' . $this->extractPrimaryKeyValue($input, 's');
                }
            }
        }
        //redirect
        $redirectAction = $redirectAction ? $redirectAction : 'list';
        $this->httpResponse = $this->httpResponse->withHeader('Location', $redirectAction);
    }
547166
protected function redirectToAction($action)
    {
        return $this->response->redirect([
            'for' => $this->router->getMatchedRoute()->getName(),
            'action' => $action
        ]);
    }