Renders the sitemap.

@return Response
330263
public function sitemapAction()
    {
        /* @var ContentInterface[] $content */
        $contents = $this->get('opifer.content.content_manager')->getRepository()->findIndexable();

        $event = new SitemapEvent();

        foreach ($contents as $content) {
            $event->addUrl($this->generateUrl('_content', ['slug' => $content->getSlug()], UrlGeneratorInterface::ABSOLUTE_URL), $content->getUpdatedAt());
        }

        $dispatcher = $this->get('event_dispatcher');
        $dispatcher->dispatch(Events::POPULATE_SITEMAP, $event);

        return $this->render('OpiferCmsBundle:Sitemap:sitemap.xml.twig', [
            'urls' => $event->getUrls(),
        ]);
    }
711432
protected function createSitemapPage()
    {
        $ret = '<?xml version="1.0" encoding="UTF-8"?>';
        $ret .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"';
        $ret .= ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';
        $ret .= ' xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9';
        $ret .= ' http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';

        $pagePriorityDefaultValue     = (float)GeneralUtility::getRootSettingValue('sitemap_priority', 0);
        $pagePriorityDepthMultiplier  = (float)GeneralUtility::getRootSettingValue(
            'sitemap_priority_depth_multiplier',
            0
        );
        $pagePriorityDepthModificator = (float)GeneralUtility::getRootSettingValue(
            'sitemap_priority_depth_modificator',
            0
        );

        if ($pagePriorityDefaultValue == 0) {
            $pagePriorityDefaultValue = 1;
        }

        if ($pagePriorityDepthMultiplier == 0) {
            $pagePriorityDepthMultiplier = 1;
        }

        if ($pagePriorityDepthModificator == 0) {
            $pagePriorityDepthModificator = 1;
        }


        // #####################
        // SetupTS conf
        // #####################

        foreach ($this->sitemapPages as $sitemapPage) {
            if (empty($this->pages[$sitemapPage['page_uid']])) {
                // invalid page
                continue;
            }

            $page = $this->pages[$sitemapPage['page_uid']];

            // #####################################
            // Page priority
            // #####################################
            $pageDepth     = $sitemapPage['page_depth'];
            $pageDepthBase = 1;

            if (!empty($sitemapPage['page_hash'])) {
                // page has module-content - trade as subpage
                ++$pageDepth;
            }

            $pageDepth -= $pagePriorityDepthModificator;


            if ($pageDepth > 0.1) {
                $pageDepthBase = 1 / $pageDepth;
            }

            $pagePriority = $pagePriorityDefaultValue * ($pageDepthBase * $pagePriorityDepthMultiplier);
            if (!empty($page['tx_metaseo_priority'])) {
                $pagePriority = $page['tx_metaseo_priority'] / 100;
            }

            $pagePriority = number_format($pagePriority, 2);

            if ($pagePriority > 1) {
                $pagePriority = '1.00';
            } elseif ($pagePriority <= 0) {
                $pagePriority = '0.00';
            }

            // #####################################
            // Page information
            // #####################################

            // page Url
            $pageUrl = GeneralUtility::fullUrl($sitemapPage['page_url']);

            // Page modification date
            $pageModificationDate = date('c', $sitemapPage['tstamp']);

            // Page change frequency
            $pageChangeFrequency = null;
            if (!empty($page['tx_metaseo_change_frequency'])) {
                // from page
                $pageChangeFrequency = (int)$page['tx_metaseo_change_frequency'];
            } elseif (!empty($sitemapPage['page_change_frequency'])) {
                // from sitemap settings
                $pageChangeFrequency = (int)$sitemapPage['page_change_frequency'];
            } elseif (!empty($this->tsSetup['changeFrequency'])) {
                // default from SetupTS
                $pageChangeFrequency = (int)$this->tsSetup['changeFrequency'];
            }

            // translate change frequency
            if (!empty($pageChangeFrequency) && !empty($this->pageChangeFrequency[$pageChangeFrequency])) {
                $pageChangeFrequency = $this->pageChangeFrequency[$pageChangeFrequency];
            } else {
                $pageChangeFrequency = null;
            }

            // #####################################
            // Sitemal page output
            // #####################################
            $ret .= '<url>';
            $ret .= '<loc>' . htmlspecialchars($pageUrl) . '</loc>';

            if ($this->tsSetup['enableLastMod']) {
                $ret .= '<lastmod>' . $pageModificationDate . '</lastmod>';
            }

            if (!empty($pageChangeFrequency)) {
                $ret .= '<changefreq>' . htmlspecialchars($pageChangeFrequency) . '</changefreq>';
            }

            if ($this->tsSetup['enablePriority']) {
                $ret .= '<priority>' . $pagePriority . '</priority>';
            }

            $ret .= '</url>';
        }


        $ret .= '</urlset>';

        // Call hook
        GeneralUtility::callHookAndSignal(__CLASS__, 'sitemapXmlPageOutput', $this, $ret);

        return $ret;
    }
25548
public function renderPagetabSeoAction()
	{
		$idPage = $this->params()->fromRoute('idPage', $this->params()->fromQuery('idPage', ''));
		$melisKey = $this->params()->fromRoute('melisKey', '');
		
		$seoForm = $this->getSeoPageForm($idPage);
		
		/**
		 * Get the data to fill the form
		 */
		if (!empty($idPage))
		{
			$melisTablePageSeo = $this->serviceLocator->get('MelisEngineTablePageSeo');
			$datasPageSeo = $melisTablePageSeo->getEntryById($idPage);
		}
		else
			$datasPageSeo = null;
		
		if (!empty($datasPageSeo))
		{
			$datasPageSeo = $datasPageSeo->current();
			if (!empty($datasPageSeo))
				$seoForm->bind($datasPageSeo);
		}
		
		/**
		 * Send back the view and add the form config inside
		*/
		$view = new ViewModel();
		$view->setVariable('meliscms_page_seo', $seoForm);
		$view->idPage = $idPage;
		$view->melisKey = $melisKey;
	
		return $view;
	}
1154543
public function render()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        // automatically redirect to SSL login
        if (!$myConfig->isSsl() && strpos($myConfig->getConfigParam('sAdminSSLURL'), 'https://') === 0) {
            \OxidEsales\Eshop\Core\Registry::getUtils()->redirect($myConfig->getConfigParam('sAdminSSLURL'), false, 302);
        }

        //resets user once on this screen.
        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        $oUser->logout();

        \OxidEsales\Eshop\Core\Controller\BaseController::render();

        $this->setShopConfigParameters();

        if ($myConfig->isDemoShop()) {
            // demo
            $this->addTplParam("user", "admin");
            $this->addTplParam("pwd", "admin");
        }
        //#533 user profile
        $this->addTplParam("profiles", \OxidEsales\Eshop\Core\Registry::getUtils()->loadAdminProfile($myConfig->getConfigParam('aInterfaceProfiles')));

        $aLanguages = $this->_getAvailableLanguages();
        $this->addTplParam("aLanguages", $aLanguages);

        // setting templates language to selected language id
        foreach ($aLanguages as $iKey => $oLang) {
            if ($aLanguages[$iKey]->selected) {
                \OxidEsales\Eshop\Core\Registry::getLang()->setTplLanguage($iKey);
                break;
            }
        }

        return "login.tpl";
    }
849974
public function index() {
		$tablesToList = [];
		$data = [];

		if (Configure::check('Sitemap.tables')) {
			$tablesToList = Configure::read('Sitemap.tables');
		}

		foreach ($tablesToList as $table) {
			$tableInstance = $this->loadModel($table);
			$data[$table] = $tableInstance->find('forSitemap');
		}

		$this->set('data', $data);
		$this->set('_serialize', false);
	}
342588
public function render()
    {
        // Prepare details
        $path       = $this->config['settings']['path'];
        $name       = $this->config['settings']['name'] . '/';
        $template   = 'index.tpl.php';
        $functions  = 'functions.php';

        // Include theme specific functions file
        $file = $path . $name . $functions;
        if (is_readable($file)) {
            include $file;
        }

        // Create views for regions, from config-file
        if (isset($this->config['views'])) {
            foreach ($this->config['views'] as $view) {
                $this->di->views->add($view['template'], $view['data'], $view['region'], $view['sort']);
            }
        }

        // Sen response headers, if any.
        $this->di->response->sendHeaders();

        // Create a view to execute the default template file
        $tpl  = $path . $name . $template;
        $data = array_merge($this->config['data'], $this->data);
        $view = $this->di->get('view');
        $view->set($tpl, $data);
        $view->setDI($this->di);
        $view->render();
    }
1164723
public function renderJavascript()
	{
		if (!$this->isEnabled()) {
			return;
		}

		return $this->view->make('googlmapper::javascript')
			->withView($this->view)
			->withOptions($this->generateRenderOptions())
			->render();
	}
1040730
public function render()
    {
        $items = [
            'header'      => $this->header,
            'description' => $this->description,
            'breadcrumb'  => $this->breadcrumb,
            'content'     => $this->build(),
        ];

        return view('merchant::content', $items)->render();
    }
9937
public function render()
	{
		// make sure we have a correct url
		$this->paginationUrl();

		// and a current page number
		$this->calculateNumbers();

		$urls = array();

		// generate the URL's for the pagination block
		if ($this->config['totalPages'] > 1)
		{
			// calculate start- and end page numbers
			$start = $this->config['current'] - floor($this->config['numberOfLinks'] * $this->config['linkOffset']);
			$end = $this->config['current'] + floor($this->config['numberOfLinks'] * ( 1 - $this->config['linkOffset']));

			// adjust for the first few pages
			if ($start < 1)
			{
				$end -= $start - 1;
				$start = 1;
			}

			// make sure we don't overshoot the current page due to rounding issues
			if ($end < $this->config['current'])
			{
				$start++;
				$end++;
			}

			// make sure we don't overshoot the total
			if ($end > $this->config['totalPages'])
			{
				$start = max(1, $start - $end + $this->config['totalPages']);
				$end = $this->config['totalPages'];
			}

			// now generate the URL's for the pagination block
			for($i = $start; $i <= $end; $i++)
			{
				$urls[$i] = $this->generateUrl($i);
			}
		}

		// send the generated url's to the view
		$this->view->set('urls', $urls);

		// store the current and total pages
		$this->view->set('active', $this->config['current']);
		$this->view->set('total', $this->config['totalPages']);

		// do we need to add a first link?
		if ($this->config['showFirst'])
		{
			$this->view->set('first', $this->generateUrl(1));
		}

		if (isset($start) and $start > 1)
		{
			$this->view->set('previous', $this->generateUrl($start-1));
		}

		if (isset($end) and $end !== $this->config['totalPages'])
		{
			$this->view->set('next', $this->generateUrl($end+1));
		}

		// do we need to add a last link?
		if ($this->config['showLast'])
		{
			$this->view->set('last', $this->generateUrl($this->config['totalPages']));
		}

		$this->view->set('align', $this->config['align']);

		// return the view
		return $this->view;
	}
1050652
public function renderSitemap(array $entries)
    {
        $data = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL;
        $data .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . PHP_EOL;
        foreach ($entries as $entry) {
            $data .= '    <url>' . PHP_EOL;
            $data .= '        <loc>' . $entry->getLoc() . '</loc>' . PHP_EOL;
            if (null !== $entry->getLastMod()) {
                $data .= '        <lastmod>' . $entry->getLastMod() . '</lastmod>' . PHP_EOL;
            }
            if (null !== $entry->getChangeFreq()) {
                $data .= '        <changefreq>' . $entry->getChangeFreq() . '</changefreq>' . PHP_EOL;
            }
            if (null !== $entry->getPriority()) {
                $data .= '        <priority>' . $entry->getPriority() . '</priority>' . PHP_EOL;
            }
            $data .= '    </url>' . PHP_EOL;
        }

        $data .= '</urlset>' . PHP_EOL;

        return $data;
    }
573026
public function render() {

		add_action( 'admin_footer', [
			$this,
			'render_repeatable_script',
		] );
		add_action( 'wp_footer', [ $this, 'render_repeatable_script' ] );

		$output = '<div data-uix-template="' . esc_attr( $this->id() ) . '" ' . $this->build_attributes() . '>';
		$output .= $this->render_instances();
		$output .= '</div>';

		$output .= $this->render_repeatable_more();

		return $output;
	}
981757
public function render()
    {
        parent::render();
        $this->_aViewData["menustructure"] = $this->getNavigation()->getDomXml()->documentElement->childNodes;

        return "list_user.tpl";
    }
171936
public function run()
    {
        $writer = $this->app->make(SitemapWriter::class);
        if (method_exists($this, 'canIncludePageInSitemap')) {
            // Add support for deprecated custom canIncludePageInSitemap
            $pageListGenerator = $this->app->make(DeprecatedPageListGenerator::class);
            $pageListGenerator->setDeprecatedChecker(function ($page, $instances) {
                return $this->canIncludePageInSitemap($page, $instances);
            });
            $writer->getSitemapGenerator()->setPageListGenerator($pageListGenerator);
        }
        $generator = $writer->getSitemapGenerator();
        if ($generator->getSiteCanonicalUrl() === '') {
            $request = $this->app->make(Request::class);
            if (!$request->getHost()) {
                throw new UserMessageException(t('Canonical URL is not set and there is no HTTP request to retrieve the site URL from.'));
            }
            $generator->setCustomSiteCanonicalUrl($request->getSchemeAndHttpHost());
        }
        $numPages = 0;
        $writer->generate(function (SitemapElement $data) use (&$numPages) {
            if ($data instanceof SitemapPage) {
                ++$numPages;
            }
        });
        $sitemapUrl = $writer->getSitemapUrl();
        if ($sitemapUrl === '') {
            $openLink = '';
        } else {
            $openLink = sprintf('<a href="%s" target="_blank">', h($sitemapUrl));
        }

        return t2(
            /*i18n: %2$s and %3$s contains HTML markup, %1$d is the number of pages */
            'The %2$ssitemap%3$s has been generated (%1$d page)',
            'The %2$ssitemap%3$s has been generated (%1$d pages)',
            $numPages,
            $openLink,
            $openLink === '' ? '' : '</a>'
        );
    }
153773
public function render()
    {
        $key = $this->getInputProcessor()->getUniqueRequestId();
        $caching_time = $this->config->getCachingTime();
        if ($caching_time && ($output = Cache::get($key))) {
            return $output;
        } else {
            $this->prepare();
            $provider = $this->config->getDataProvider();
            $provider->reset();
            $output = View::make(
                $this->getMainTemplate(),
                $this->getViewData()
            )->render();
            if ($caching_time) {
                Cache::put($key, $output, $caching_time);
            }
            return $output;
        }
    }
170671
public function render()
    {
        // Run only in case there are breadcrumbs
        if ($this->breadcrumbBag->has()) {
            $ulClass = $this->getOption('ulClass', 'breadcrumb');
            return $this->renderList($ulClass, $this->createBreadcrumbItems());
        }
    }
465576
public function getSiteMap()
    {
        $sitemap = $this->getCacheItem('site-map');

        if (null === $sitemap) {
            /* @var $menuService MenuService */
            $menuService = $this->getService(MenuService::class);

            $navigation = $menuService->getPages();

            $argv = $this->prepareEventArguments(compact('navigation'));
            $this->getEventManager()->trigger('uthando.site-map', $this, $argv);

            $sitemap = $this->getService('ViewHelperManager')
                ->get(Navigation::class)
                ->setRole('guest')
                ->sitemap($navigation)
                ->render();

            $this->setCacheItem('site-map', $sitemap);
        }

        return $sitemap;
    }
138856
public function generateSitemap()
    {
        if ($this->findAllEntries()) {
            $sitemap = GeneralUtility::makeInstance(Sitemap::class);
            $sitemap->setUrlEntries($this->entryStorage);

            return $sitemap;
        }

        return null;
    }