Symfony\Component\Templating\PhpEngine::exists PHP Метод

exists() публичный Метод

Returns true if the template exists.
public exists ( mixed $name ) : boolean
$name mixed A template name or a TemplateReferenceInterface instance
Результат boolean true if the template exists, false otherwise
    public function exists($name)
    {
        try {
            $this->load($name);
        } catch (\InvalidArgumentException $e) {
            return false;
        }

        return true;
    }