public function serialize()
    {
        $request = $this->requestStack->getCurrentRequest();

        $logo = $this->fileUtilities->getOneBy([
            'url' => $this->config->getParameter('logo'),
        ]);

        return [
            'maintenance' => MaintenanceHandler::isMaintenanceEnabled(),
            'logo' => $logo ? [
                'url' => $logo->getUrl(),
                'colorized' => 'image/svg+xml' === $logo->getMimeType(),
            ] : null,
            'logo_redirect_home' => $this->config->getParameter('logo_redirect_home'),
            'name' => $this->config->getParameter('name'),
            'secondaryName' => $this->config->getParameter('secondary_name'),
            'description' => null, // the one for the current locale
            'version' => $this->versionManager->getDistributionVersion(),
            'environment' => $this->env,
            'links' => $this->serializeLinks(),
            'asset' => $this->assets->getUrl(''),
            'server' => [
                'protocol' => $request->isSecure() || $this->config->getParameter('ssl_enabled') ? 'https' : 'http',
                'host' => $this->config->getParameter('domain_name') ? $this->config->getParameter('domain_name') : $request->getHost(),
                'path' => $request->getBasePath(),
            ],
            'theme' => $this->serializeTheme(),
            'locale' => $this->serializeLocale(),
            'openGraph' => [
                'enabled' => $this->config->getParameter('enable_opengraph'),
            ],
            'resources' => [
                'types' => array_map(function (ResourceType $resourceType) {
                    return $this->resourceTypeSerializer->serialize($resourceType);
                }, $this->om->getRepository('ClarolineCoreBundle:Resource\ResourceType')->findAll()),
                'softDelete' => $this->config->getParameter('resource.soft_delete'),
            ],
            'plugins' => $this->pluginManager->getEnabled(true),
            'javascripts' => $this->config->getParameter('javascripts'),
        ];
    }