public function renderQueue() { if (!$this->queueExists) { return "An error occured when saving to the backend"; } $error = ''; if (array_key_exists("error", $this->queue)) { $error = Utils::translateException($this->queue["error"]); } return $this->twig->render('RedKiteCms/Resources/views/Queue/queue.html.twig', array("queue" => $this->queue, "queue_file" => $this->queueFile, "error" => $error)); }
/** * Handles the exceptions * * @param GetResponseForExceptionEvent $event */ public function onKernelException(GetResponseForExceptionEvent $event) { $exception = $event->getException(); if ($exception instanceof AuthenticationCredentialsNotFoundException) { return new RedirectResponse("/login"); } $message = $exception->getMessage(); if ($exception instanceof NotFoundHttpException || $exception instanceof PageNotPublishedException) { $this->render404page($event, $message); return; } if (!$exception instanceof RedKiteCmsExceptionInterface) { DataLogger::log($message, DataLogger::CRITICAL); if ($this->debug) { return $event; } $this->setUpResponse($event, $message); return; } $message = Utils::translateException($message, $exception); $this->setUpResponse($event, $message); DataLogger::log($message, DataLogger::ERROR); }