@param ActionContext $actionContext Action context and descriptor.

@return void
512775
private static function annotateAndValidateModel($modelState) {
        foreach ($modelState->items as $item) {
            self::annotateAndValidateModelEntry($modelState, $item->key);
        }
    }
229107
private static function cachingClient($actionContext) {
        $cacheSettings = InternalHelper::getStaticPropertyValue('\\PhpMvc\\OutputCache', 'settings');
        $actionName = $actionContext->getActionName();

        // location
        if (!empty($cacheSettings[$actionName]['location'])) {
            $location = intval($cacheSettings[$actionName]['location']);
        }
        elseif (!empty($cacheSettings['.']['location'])) {
            $location = intval($cacheSettings['.']['location']);
        }
        else {
            $location = OutputCacheLocation::ANY;
        }

        // duration
        if (!empty($cacheSettings[$actionName]['duration'])) {
            $duration = intval($cacheSettings[$actionName]['duration']);
        }
        elseif (!empty($cacheSettings['.']['duration'])) {
            $duration = intval($cacheSettings['.']['duration']);
        }
        else {
            $duration = 0;
        }

        // send headers
        $httpContext = $actionContext->getHttpContext();
        $response = $httpContext->getResponse();
        $cacheControl = array();

        switch ($location) {
            case OutputCacheLocation::ANY:
            case OutputCacheLocation::DOWNSTREAM:
                $cacheControl[] = 'public';
                break;

            case OutputCacheLocation::NONE:
                $cacheControl[] = 'no-cache';
                $cacheControl[] = 'must-revalidate';
                $pragma = 'no-cache';
                break;

            case OutputCacheLocation::SERVER:
                $cacheControl[] = 'no-cache';
                $pragma = 'no-cache';
                break;

            case OutputCacheLocation::CLIENT:
            case OutputCacheLocation::SERVER_AND_CLIENT:
                $cacheControl[] = 'private';
                break;
        }

        if ($duration > 0) {
            $cacheControl[] = 'max-age=' . $duration;
        }

        $response->addHeader('Cache-Control', implode(', ', $cacheControl));

        if (isset($pragma)) {
            $response->addHeader('Pragma', $pragma);
        }
    }
1294043
public function action(Action $action) {
        if($action->register === Action::REGISTER_AT_END) {
            $this->registerActionsLast[] = $action;
        } else {
            if($action->register) {
                $this->registerAction($action);
            }
        }
    }
1331439
protected function _actionBrowse(AnCommandContext $context)
    {
        $entities = parent::_actionBrowse($context);

        $entities->order($this->sort);

        return $entities;
    }
588580
protected function _actionRender(ViewContext $context)
    {
        $content = $context->content;

        if(is_string($content)) {
            $content = trim($content);
        }

        return $content;
    }
467700
public function handleAction(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        $this->checkLanguage($event->getEnvironment(), 'create' === $event->getAction()->getName());
    }
970880
public function initializeContext(Context $context)
    {
        if (!$context instanceof MinkAwareContext) {
            return;
        }

        $context->setMink($this->mink);
        $context->setMinkParameters($this->parameters);
    }
1141530
protected function _actionBrowse(ControllerContext $context)
    {
        $entity = $this->getModel()->fetch();

        //Set the entity in the context
        $context->setEntity($entity);

        return $entity;
    }
42390
public function runActionId($actionID = '')
    {
        if (null !== ($action = $this->createAction($actionID))) {
            if ($this->getModule()->beforeControllerAction($this, $action)) {
                $this->runAction($action);
                $this->getModule()->afterControllerAction($this, $action);
            }
        } else {
            $this->missingAction($actionID);
        }
    }
925202
private static function executeAction($actionContext) {
        $controller = $actionContext->getController();
        $actionName = $actionContext->getActionName();
        $action = new \ReflectionMethod($controller, $actionName);

        if (!$action->isPublic()) {
            throw new \Exception('Action methods must have a public modifier. The action call "' . $actionName . '" is denied.');
        }

        return $action->invokeArgs($controller, $actionContext->getArguments());
    }
516340
public function handle(ComponentContext $componentContext)
    {
        $httpRequest = $componentContext->getHttpRequest();
        $widgetContext = $this->extractWidgetContext($httpRequest);
        if ($widgetContext === null) {
            return;
        }
        /** @var $actionRequest ActionRequest */
        $actionRequest = $this->objectManager->get(\TYPO3\Flow\Mvc\ActionRequest::class, $httpRequest);
        $actionRequest->setArguments($this->mergeArguments($httpRequest, array()));
        $actionRequest->setArgument('__widgetContext', $widgetContext);
        $actionRequest->setControllerObjectName($widgetContext->getControllerObjectName());
        $this->setDefaultControllerAndActionNameIfNoneSpecified($actionRequest);

        $this->securityContext->setRequest($actionRequest);

        $this->dispatcher->dispatch($actionRequest, $componentContext->getHttpResponse());
        // stop processing the current component chain
        $componentContext->setParameter(\TYPO3\Flow\Http\Component\ComponentChain::class, 'cancel', true);
    }
534934
public function startAction($actionName)
    {
        $startStopwatch = $this->stopwatch && empty($this->actionStack);

        $this->actionStack[] = ['name' => $actionName, 'time' => microtime(true), 'subtrahend' => 0];
        $this->lastActionIndex++;
        if ($startStopwatch) {
            $this->stopwatch->start($this->getStopwatchName(), $this->sectionName);
        }
    }
492008
public function initializeContext(Context $context)
    {
        if (!$context instanceof CollectionAwareContextInterface) {
            return;
        }
        $context->setTerminalCollection($this->collection);
        $context->setTerminalDefaultAlias($this->defaultAlias);
    }
582172
protected function _actionPurge(KControllerContextInterface $context)
    {
        $model = $this->getModel();
        $state = $model->getState();
        $query = $this->getObject('lib:database.query.delete');

        $query->table(array($model->getTable()->getName()));

        if ($state->end_date && $state->end_date != '0000-00-00')
        {
            $end_date = $this->getObject('lib:date', array('date' => $state->end_date));
            $end      = $end_date->format('Y-m-d');

            $query->where('DATE(created_on) <= :end')->bind(array('end' => $end));
        }

        if (!$this->getModel()->getTable()->getAdapter()->execute($query)) {
            throw new KControllerExceptionActionFailed('Delete Action Failed');
        } else {
            $context->getResponse()->setStatus(KHttpResponse::NO_CONTENT);
        }
    }
381435
protected function _unlockResource(ControllerContextModel $context)
    {
        if($this->isLockable() && $this->canEdit()) {
            $context->result->unlock();
        }
    }
885641
protected function _resolveRequest(DispatcherContext $context)
    {
        //Resolve the controller
        if($context->request->query->has('view')) {
            $this->setController($context->request->query->get('view', 'cmd'));
        }

        //Resolve the controller action
        if($context->request->data->has('_action')) {
            $this->setControllerAction($context->request->data->get('_action', 'cmd'));
        }
    }
401568
protected function setDefaultControllerAndActionNameIfNoneSpecified(ActionRequest $actionRequest)
    {
        if ($actionRequest->getControllerName() === null) {
            $actionRequest->setControllerName('Standard');
        }
        if ($actionRequest->getControllerActionName() === null) {
            $actionRequest->setControllerActionName('index');
        }
    }