src/Controller/HostingController.php line 19

  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\HostingPackages;
  4. use App\Entity\Interested;
  5. use App\Entity\ProductTypes;
  6. use App\Form\InterestedType;
  7. use Doctrine\Persistence\ManagerRegistry;
  8. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  9. use Symfony\Component\HttpFoundation\Request;
  10. use Symfony\Component\HttpFoundation\Response;
  11. use Symfony\Component\Routing\Annotation\Route;
  12. class HostingController extends AbstractController
  13. {
  14.     #[Route('/web-hosting'name'app_linux')]
  15.     public function linux(ManagerRegistry $doctrineRequest $request): Response
  16.     {
  17.         $data = [
  18.             'pageTitle' => 'Powerful Web Hosting in Wales | Little Welsh Hosting Company',
  19.             'pageDescription' => '',
  20.         ];
  21.         $hosting $doctrine->getRepository(ProductTypes::class)->findOneBy([
  22.             'dreamscapeName' => 'Linux Hosting'
  23.         ]);
  24.         $products $doctrine->getRepository(HostingPackages::class)->findBy([
  25.             'type' => $hosting,
  26.             'isActive' => 1
  27.         ],[
  28.             'position' => 'ASC'
  29.         ]);
  30.         return $this->render('hosting/shared.html.twig', [
  31.             'data' => $data,
  32.             'products' => $products
  33.         ]);
  34.     }
  35.     #[Route('/wordpress-hosting'name'app_wordpress_hosting')]
  36.     public function wordpress(ManagerRegistry $doctrine): Response
  37.     {
  38.         $data = [
  39.             'pageTitle' => 'Managed, Reliable WordPress Web Hosting in Wales | Little Welsh Hosting Company',
  40.             'pageDescription' => '',
  41.         ];
  42.         $hosting $doctrine->getRepository(ProductTypes::class)->findOneBy([
  43.             'dreamscapeName' => 'WordPress Hosting'
  44.         ]);
  45.         $featured $doctrine->getRepository(HostingPackages::class)->findOneBy([
  46.             'type' => $hosting,
  47.             'period' => 1,
  48.             'popular' => 1,
  49.             'isActive' => 1
  50.         ],[
  51.             'position' => 'ASC'
  52.         ]);
  53.         $products $doctrine->getRepository(HostingPackages::class)->findBy([
  54.             'type' => $hosting,
  55.             'isActive' => 1
  56.         ],[
  57.             'position' => 'ASC'
  58.         ]);
  59.         return $this->render('hosting/wordpress.html.twig', [
  60.             'data' => $data,
  61.             'products' => $products,
  62.             'featured' => $featured
  63.         ]);
  64.     }
  65.     #[Route('/business-hosting'name'app_business_hosting')]
  66.     public function business()
  67.     {
  68.     }
  69. }