<?php
namespace App\Controller;
use App\Entity\Journal;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class SitemapController extends AbstractController
{
/**
* @Route("/sitemap.xml", name="app_sitemap")
*/
public function index(EntityManagerInterface $em): Response
{
ini_set('memory_limit', '512M');
// $ids = [];
// $journals = $em->getRepository(Journal::class)->findAll();
$journals = $em->getRepository(Journal::class)->limitedJournals(100);
$pages = [
'',
'/journal-search',
'/authors',
'/advanced-search',
'/blog',
'/faq',
'/about-us',
'/contact-us',
'/legal-notice',
'/privacy-policy',
'/verified-journal',
'/top-journals-list',
'/user-registration',
'/indexing-services',
'/help-researchguide',
];
$articles = [
'how-to-verify-indexed-journals-in-scopus-and-web-of-science',
'what-is-scopus-database',
'automation',
'what-role-has-technology-in-the-fights-against-covid19',
'the-internet-of-things',
'how-to-create-a-professional-chart-with-graph-maker-of-researchguide-net',
'indexed-journal-what-does-it-mean',
'how-to-publish-article-in-journal',
'the-profound-benefits-of-scientific-research-shaping-our-world-for-a-better-future',
];
return $this->render('sitemap/index.html.twig', [
'journals' => $journals,
'pages' => $pages,
'articles' => $articles
]);
}
}