vendor/kobizo/cms-bundle/src/Controller/ViewHelper/Checker/ViewChecker.php line 21

Open in your IDE?
  1. <?php
  2. namespace Kobizo\Bundle\CmsBundle\Controller\ViewHelper\Checker;
  3. use Psr\Container\ContainerInterface;
  4. class ViewChecker
  5. {
  6.     private ContainerInterface $container;
  7.     public function __construct(ContainerInterface $container)
  8.     {
  9.         $this->container $container;
  10.     }
  11.     /**
  12.      * Check if a templte exists
  13.      */
  14.     public function exists(string $view): bool
  15.     {
  16.         return $this->container->get('twig')->getLoader()->exists($view);
  17.     }
  18. }