/** * Implements the action to show the user dashboard interface * @param array $options * * @return \Symfony\Component\HttpFoundation\Response */ public function show(array $options) { $resolver = new OptionsResolver(); $this->configureOptions($resolver); $this->options = $resolver->resolve($options); $userName = "******"; $templateAssets = $this->options["template_assets"]; $templateAssets->boot('dashboard'); $template = 'RedKiteCms/Resources/views/Dashboard/user.html.twig'; return $options["twig"]->render($template, array("template_assets_manager" => $templateAssets, "user" => $userName, "version" => ConfigurationHandler::getVersion())); }
/** * Implements the action to render the CMS dashboard * @param array $options * * @return \Symfony\Component\HttpFoundation\Response */ public function show(array $options) { $resolver = new OptionsResolver(); $this->configureOptions($resolver); $this->options = $resolver->resolve($options); $this->options["template_assets"]->boot('dashboard'); $backRoute = $this->options["request"]->getSession()->get('last_route'); if (!in_array($backRoute, $this->options["routes"]["pages"])) { $backRoute = $this->options["routes"]["homepage"]; } $template = 'RedKiteCms/Resources/views/Dashboard/home.html.twig'; return $options["twig"]->render($template, array("template_assets_manager" => $this->options["template_assets"], "version" => ConfigurationHandler::getVersion(), "back_route" => $backRoute)); }
/** * Implements the action to show the page collection dashboard interface * @param array $options * * @return \Symfony\Component\HttpFoundation\Response */ public function show(array $options) { $resolver = new OptionsResolver(); $this->configureOptions($resolver); $this->options = $resolver->resolve($options); $pagesParser = $this->options["pages_collection_parser"]; $pages = $pagesParser->contributor($this->options["username"])->parse()->pages(); $this->options["template_assets"]->boot('dashboard'); $templates = $this->options["theme"]->templates(); $formFactory = $this->options['form_factory']; $form = $formFactory->create(new PageType(array_combine($templates, $templates))); $pageForm = $form->createView(); $form = $formFactory->create(new SeoType()); $seoForm = $form->createView(); $template = 'RedKiteCms/Resources/views/Dashboard/pages.html.twig'; $languages = $this->options["configuration_handler"]->languages(); return $options["twig"]->render($template, array("template_assets_manager" => $this->options["template_assets"], "pages" => rawurlencode(json_encode($pages)), "pageForm" => $pageForm, "seoForm" => $seoForm, "version" => ConfigurationHandler::getVersion(), "home_template" => $this->options["theme"]->homepageTemplate(), "languages" => $languages)); }
/** * Implements the action to show the themes dashboard interface * @param array $options * * @return \Symfony\Component\HttpFoundation\Response */ public function show(array $options) { $resolver = new OptionsResolver(); $this->configureOptions($resolver); $this->options = $resolver->resolve($options); $templateAssets = $this->options["template_assets"]; $templateAssets->boot('dashboard'); $themes = array(); $themePlugins = $this->options["plugin_manager"]->getThemePlugins(); foreach ($themePlugins as $themePlugin) { if ($themePlugin->getName() == $this->options["configuration_handler"]->theme()) { $themes["active_theme"] = $themePlugin; continue; } $themes["available_themes"][] = $themePlugin; } $template = 'RedKiteCms/Resources/views/Dashboard/themes.html.twig'; return $options["twig"]->render($template, array("template_assets_manager" => $templateAssets, "themes" => $themes, "isTheme" => $this->options["configuration_handler"]->isTheme(), "version" => ConfigurationHandler::getVersion())); }