/**
  * Slot method for CPSIT\T3eventsReservation\ReservationController signal 'handleEntityNotFoundError'
  *
  * @param array $params
  * @return array
  */
 public function handleEntityNotFoundSlot(array $params)
 {
     if (isset($params['config']) && is_array($params['config'])) {
         $handler = $params['config'][0];
         $actionName = $params['config'][1];
         $params[$handler]['actionName'] = $actionName;
         if ($handler === 'redirect') {
             $params[$handler]['statusCode'] = 302;
         }
         if ($this->session->has(ReservationController::SESSION_IDENTIFIER_RESERVATION)) {
             $reservationId = (string) $this->session->get(ReservationController::SESSION_IDENTIFIER_RESERVATION);
             $params[$handler]['arguments'] = ['reservation' => $reservationId];
         }
         if (isset($params['requestArguments']['reservation'])) {
             $params[$handler]['controllerName'] = 'Reservation';
             $params[$handler]['arguments']['reservation'] = $params['requestArguments']['reservation'];
         }
     }
     return [$params];
 }
 /**
  * error action
  */
 public function errorAction()
 {
     $this->clearCacheOnError();
     if ($this->arguments instanceof Arguments) {
         $validationResult = $this->arguments->getValidationResults();
         if ($validationResult->hasErrors()) {
             $referringRequest = $this->request->getReferringRequest();
             if ($referringRequest !== null) {
                 $originalRequest = clone $this->request;
                 $this->request->setOriginalRequest($originalRequest);
                 $this->request->setOriginalRequestMappingResults($this->arguments->getValidationResults());
                 $this->forward($referringRequest->getControllerActionName(), $referringRequest->getControllerName(), $referringRequest->getControllerExtensionName(), $referringRequest->getArguments());
             }
         }
     }
     // clear any previous flashmessage in order to avoid double entries
     $flashMessageQueue = $this->getFlashMessageQueue();
     if ($flashMessageQueue instanceof FlashMessageQueue) {
         $flashMessageQueue->__call('getAllMessagesAndFlush', []);
     }
     $this->addFlashMessage($this->getErrorFlashMessage(), '', FlashMessage::ERROR);
     $this->session->clean();
 }