src/PHPDish/Bundle/AdminBundle/Twig/DataGridExtension.php
protected function getTemplates(Twig_Environment $environment)
    {
        if ($this->templates) {
            return $this->templates;
        }
        $this->templates[] = $environment->load($this->defaultTemplate);
        if ($this->theme) {
            if (!$this->theme instanceof \Twig_Template && !$this->theme instanceof \Twig_TemplateWrapper) {
                $template = $environment->load($this->theme);
            } else {
                $template = $this->theme;
            }
            $this->templates[] = $template;
        }
        return $this->templates;
    }
protected function getTemplates(Twig_Environment $environment)
    {
        if ($this->templates) {
            return $this->templates;
        }
        $this->templates[] = $environment->load($this->defaultTemplate);
        if ($this->theme) {
            if (!$this->theme instanceof \Twig_Template && !$this->theme instanceof \Twig_TemplateWrapper) {
                $template = $environment->load($this->theme);
            } else {
                $template = $this->theme;
            }
            $this->templates[] = $template;
        }
        return $this->templates;
    }
覆盖父级方法

@param Twig_Environment $environment
@return \Twig_Template[]
@throws \Twig_Error_Loader
@throws \Twig_Error_Runtime
@throws \Twig_Error_Syntax