public function setTheme(DataSourceViewInterface $dataSource, $theme, array $vars = [])
    {
        $this->themes[$dataSource->getName()] = ($theme instanceof Twig_Template)
            ? $theme
            : $this->environment->loadTemplate($theme);
        $this->themesVars[$dataSource->getName()] = $vars;
    }