<?php
namespace Kobizo\Bundle\CmsBundle\Controller\ViewHelper\Checker;
use Psr\Container\ContainerInterface;
class ViewChecker
{
private ContainerInterface $container;
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
/**
* Check if a templte exists
*/
public function exists(string $view): bool
{
return $this->container->get('twig')->getLoader()->exists($view);
}
}