Handle the event to process the action.

@param ActionEvent $event The action event.

@return void
12473
public function handleEvent(ActionEvent $event)
    {
        $response = $this->process($event->getAction(), $event->getEnvironment());
        $event->setResponse($response);
    }
1212624
public function about(ResourceActionEvent $event)
    {
        $event->setResponse(
            new JsonResponse($this->serializer->serialize($event->getResourceNode()))
        );
        $event->stopPropagation();
    }
1318188
public function processRedirectAfterPublish(FormActionEvent $event): void
    {
        if ($event->getForm()['redirectUrlAfterPublish']->getData()) {
            return;
        }

        $this->resolveSystemUrlRedirect($event);
    }
1003715
public function onException(ActionExceptionEvent $event)
    {
        $e = $event->getException();

        $message = sprintf(
            'API Exception: "%s" (%s) in file %s on line %d',
            $e->getMessage(),
            get_class($e),
            $e->getFile(),
            $e->getLine()
        );

        $this->logger->error($message);
    }
1362205
protected function dispatch($eventName, ActionEvent $event = null)
    {
        if ($event == null) {
            $event = new DefaultActionEvent();
        }

        $this->getDispatcher()->dispatch($eventName, $event);
    }
868480
protected function update(Event $event)
    {
        $this->dispatch(static::EVENT_UPDATE_BEFORE, $event);
        if (!$event->isPropagationStopped()) {
            $this->updateProcess($event);
            if (!$event->isPropagationStopped()) {
                $this->dispatch(static::EVENT_UPDATE_AFTER, $event);
            }
        }
    }
344054
public function handleAction($action, $actionParams)
    {
        $this->setView($action);
        $response = parent::handleAction($action, $actionParams);

        if ($response instanceof Response) {
            return $response;
        }

        if (is_string($response)) {
            $this->controllerView->content = $response;
        } elseif (isset($this->view)) {
            $this->controllerView->content = $this->view->render();
        }

        $this->response->setContent($this->controllerView->render());

        return $this->response;
    }
777268
@Override
	public void actionPerformed(ActionEvent event) {
		JMenuItem item = (JMenuItem) event.getSource();

		if (item.isSelected()) {
			showColumn(item.getText());
		} else {
			hideColumn(item.getText());
		}
	}
212892
public void actionPerformed (ActionEvent event)
    {
        CommandEvent ce = (CommandEvent)event;
        _accessor.updateEntry(_setName, (DSet.Entry)ce.getArgument());
    }
813036
public function initializePanels(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        if (!\in_array(
            $event->getAction()->getName(),
            ['copy', 'create', 'paste', 'delete', 'move', 'undo', 'edit', 'toggle', 'showAll', 'show']
        )
        ) {
            return;
        }

        $environment = $event->getEnvironment();
        $definition  = $environment->getDataDefinition();
        $view        = $environment->getView();

        if (!$view instanceof BaseView
            || !$view->getPanel()
            || !$definition->hasDefinition(Contao2BackendViewDefinitionInterface::NAME)
        ) {
            return;
        }

        /** @var Contao2BackendViewDefinitionInterface $backendDefinition */
        $backendDefinition = $definition->getDefinition(Contao2BackendViewDefinitionInterface::NAME);
        $listingConfig     = $backendDefinition->getListingConfig();

        $dataConfig = $environment->getBaseConfigRegistry()->getBaseConfig();
        $panel      = $view->getPanel();

        ViewHelpers::initializeSorting($panel, $dataConfig, $listingConfig);
    }
713807
private function checkPermission(ActionEvent $event)
    {
        $environment = $event->getEnvironment();

        if (true === $environment->getDataDefinition()->getBasicDefinition()->isEditable()) {
            return true;
        }

        $inputProvider = $environment->getInputProvider();

        $event->setResponse(
            \sprintf(
                '<div style="text-align:center; font-weight:bold; padding:40px;">
                    You have no permission for edit model %s.
                </div>',
                ModelId::fromSerialized($inputProvider->getParameter('id'))->getSerialized()
            )
        );

        return false;
    }
280130
@Override
    public void handleEvent(Event event) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Received event: " + event.getTopic());
        }
        // if (event.getTopic().equals(PURGE_EVENT)) {
        this.sessionMgr.startPurge();
        // }
    }
907387
public function afterAction($event)
    {
        if ($this->schedule) {
            if ($event->result === false) {
                $exitCode = CronScheduleStatus::ERROR;
            } else {
                $exitCode = CronScheduleStatus::SUCCESS;
            }
            $this->schedule->endCronSchedule($exitCode);
            $this->schedule = null;
        }
    }
1042170
final public function handle(Event $event): void
    {
        if (!$this->isEventSupported($event)) {
            throw new InvalidEventException(\sprintf(
                'Event must be a %s, %s given',
                \implode('or ', $this->getSupportedEventTypes()),
                \get_class($event)
            ));
        }

        $this->handleEvent($event);
    }
249959
public function handle(EventInterface $event)
    {

        try {
            // load the application server instance
            /** @var \AppserverIo\Psr\ApplicationServer\ApplicationServerInterface $applicationServer */
            $applicationServer = $this->getApplicationServer();

            // write a log message that the event has been invoked
            $applicationServer->getSystemLogger()->info($event->getName());

            // load the service instance and switch the umask
            /** @var \AppserverIo\Appserver\Core\Api\DeploymentService $service */
            $service = $applicationServer->newService('AppserverIo\Appserver\Core\Api\DeploymentService');
            $service->initUmask($applicationServer->getSystemConfiguration()->getUmask());

        } catch (\Exception $e) {
            $applicationServer->getSystemLogger()->error($e->__toString());
        }
    }
1074832
public function afterHandle($event)
    {
        parent::afterHandle($event);
        
        // reset form_token
        if ($this->request->getMethod() === 'POST') {
            
            if ($this->errorInfo && !$this->errorInfo['errcode'] && $this->options['csrfTokenEnabled'] && $this->options['csrfTokenAutoReset']) {
                $this->resetCsrfToken();
            }
        }
    }
983732
public function handleHandleHttpRequestEvent(HandleHttpRequestEvent $event) {
        $event->setResponse(
            $this->requestHandler->handle($event->getRequest())
        );
    }