original_string: protected function getCustomThemeLoader(Plugin $theme)
      {
          $pluginsDir = Manager::getPluginDirectory($theme->getPluginName());
          $themeDir = $pluginsDir . '/templates/';
  
          if (!file_exists($themeDir)) {
              return false;
          }
          $themeLoader = new Twig_Loader_Filesystem(array($themeDir), PIWIK_DOCUMENT_ROOT.DIRECTORY_SEPARATOR);
  
          return $themeLoader;
      }
code: protected function getCustomThemeLoader(Plugin $theme)
      {
          $pluginsDir = Manager::getPluginDirectory($theme->getPluginName());
          $themeDir = $pluginsDir . '/templates/';
  
          if (!file_exists($themeDir)) {
              return false;
          }
          $themeLoader = new Twig_Loader_Filesystem(array($themeDir), PIWIK_DOCUMENT_ROOT.DIRECTORY_SEPARATOR);
  
          return $themeLoader;
      }
code_tokens: protected function getCustomThemeLoader ( Plugin $ theme ) { $ pluginsDir = Manager :: getPluginDirectory ( $ theme -> getPluginName ( ) ) ; $ themeDir = $ pluginsDir . '/templates/' ; if ( ! file_exists ( $ themeDir ) ) { return false ; } $ themeLoader = new Twig_Loader_Filesystem ( array ( $ themeDir ) , PIWIK_DOCUMENT_ROOT . DIRECTORY_SEPARATOR ) ; return $ themeLoader ; }
docstring: create template loader for a custom theme
  @param \Piwik\Plugin $theme
  @return \Twig_Loader_Filesystem
docstring_tokens: create template loader for a custom theme