Twig/DataGridExtension.php
protected function getTemplatesFromString(Twig_Environment $environment, $theme)
    {
        $this->templates = [];

        $template = $environment->loadTemplate($theme);
        while ($template instanceof \Twig_Template) {
            $this->templates[] = $template;
            $template = $template->getParent([]);
        }

        return $this->templates;
    }
protected function getTemplatesFromString(Twig_Environment $environment, $theme)
    {
        $this->templates = [];

        $template = $environment->loadTemplate($theme);
        while ($template instanceof \Twig_Template) {
            $this->templates[] = $template;
            $template = $template->getParent([]);
        }

        return $this->templates;
    }
@param Twig_Environment $environment
@param unknown          $theme

@return array|Twig_Template[]