Ejemplo n.º 1
0
 public function __construct($paths = array(), $extension = null)
 {
     parent::__construct($paths);
     if (is_null($extension)) {
         $this->extension = $extension;
     }
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param FileLocatorInterface        $locator A FileLocatorInterface instance
  * @param TemplateNameParserInterface $parser  A TemplateNameParserInterface instance
  */
 public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser)
 {
     parent::__construct(array());
     $this->locator = $locator;
     $this->parser = $parser;
     $this->cache = array();
 }
Ejemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param FileLocatorInterface        $locator     A FileLocatorInterface instance
  * @param TemplateNameParserInterface $parser      A TemplateNameParserInterface instance
  * @param ActiveTheme                 $activeTheme
  */
 public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, ActiveTheme $activeTheme = null)
 {
     parent::__construct(array());
     $this->locator = $locator;
     $this->parser = $parser;
     $this->activeTheme = $activeTheme;
 }
Ejemplo n.º 4
0
 /**
  * AliasLoader constructor.
  *
  * @param $paths
  *    An array of paths to pass to the parent constructor.
  * @param $aliases
  *    An array of alias/path pairs.
  */
 public function __construct($paths, $aliases)
 {
     parent::__construct($paths);
     foreach ($aliases as $alias => $path) {
         $this->addPath($path, $alias);
     }
 }
Ejemplo n.º 5
0
 /**
  * Constructs a new FilesystemLoader object.
  *
  * @param string|array $paths
  *   A path or an array of paths to check for templates.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler service.
  * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
  *   The theme handler service.
  */
 public function __construct($paths = array(), ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler)
 {
     parent::__construct($paths);
     // Add namespaced paths for modules and themes.
     $namespaces = array();
     foreach ($module_handler->getModuleList() as $name => $extension) {
         $namespaces[$name] = $extension->getPath();
     }
     foreach ($theme_handler->listInfo() as $name => $extension) {
         $namespaces[$name] = $extension->getPath();
     }
     foreach ($namespaces as $name => $path) {
         $this->addPath($path . '/templates', $name);
     }
 }
Ejemplo n.º 6
0
 /**
  * Constructor.
  *
  * @param string|array $paths A path or an array of paths where to look for templates
  */
 public function __construct($theme, $base_theme = array())
 {
     $cached = cache_get($theme . ':twig_paths');
     $paths = array();
     if ($cached) {
         $this->setPaths($cached->data, $theme);
         $paths = array_merge($paths, $cached->data);
     }
     foreach ($base_theme as $theme_info) {
         $cached = cache_get($theme_info->name . ':twig_paths');
         if ($cached) {
             $this->setPaths($cached->data, $theme_info->name);
             $paths = array_merge($paths, $cached->data);
         }
     }
     parent::__construct($paths);
 }
Ejemplo n.º 7
0
 /**
  * TwigFilesystemLoader constructor.
  *
  * @param array|string $paths
  * @param string       $separator
  */
 public function __construct($paths, $separator = '.')
 {
     $this->separator = $separator;
     parent::__construct($paths);
 }
 public function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 9
0
 public function __construct(Application $application)
 {
     parent::__construct();
     $this->setApplication($application)->setPaths($application->getAbsolutePath(Environment::DIR_TEMPLATES));
 }
Ejemplo n.º 10
0
 /**
  * Constructor
  *
  * @param string|array $paths
  * @param string $extension
  * @return void
  */
 public function __construct($paths = [], $extension = 'twig')
 {
     parent::__construct($paths);
     $this->extension = $extension;
 }
Ejemplo n.º 11
0
 /**
  * Constructor.
  *
  * @param FilesystemInterface $filesystem The filesystem to use
  * @param array|string        $paths      A path or an array of paths where to look for templates
  */
 public function __construct(FilesystemInterface $filesystem, $paths = [])
 {
     $this->filesystem = $filesystem;
     parent::__construct($paths);
 }
Ejemplo n.º 12
0
 /**
  * Constructor.
  *
  * @param TemplateNameParserInterface $nameParser A TemplateNameParserInterface instance
  */
 public function __construct(TemplateNameParserInterface $nameParser, array $paths = array(), LoggerInterface $logger = null)
 {
     parent::__construct($paths);
     $this->nameParser = $nameParser;
     $this->logger = $logger;
 }
Ejemplo n.º 13
0
 /**
  * Constructor.
  *
  * @param FilesystemLoader            $loader
  * @param TemplateNameParserInterface $parser
  */
 public function __construct(FilesystemLoader $loader, TemplateNameParserInterface $parser = null)
 {
     parent::__construct([]);
     $this->loader = $loader;
     $this->parser = $parser ?: new TemplateNameParser();
 }
Ejemplo n.º 14
0
 public function __construct(tubepress_api_log_LoggerInterface $logger, array $paths)
 {
     parent::__construct($paths);
     $this->_logger = $logger;
     $this->_shouldLog = $logger->isEnabled();
 }
Ejemplo n.º 15
0
 function __construct($paths, $alwaysReload = false)
 {
     $this->alwaysReload = $alwaysReload;
     parent::__construct($paths);
 }
Ejemplo n.º 16
0
 /**
  * Class init
  *
  * @param array $paths
  */
 public function __construct($paths = array())
 {
     parent::__construct($paths);
 }
Ejemplo n.º 17
0
 /**
  * Constructs the loader.
  *
  * @param \Twig_LoaderInterface $loader a twig loader
  */
 public function __construct(\Twig_LoaderInterface $loader, SiteContext $siteContext)
 {
     parent::__construct();
     $this->loader = $loader;
     $this->siteContext = $siteContext;
 }
Ejemplo n.º 18
0
 /**
  * Constructor
  *
  * @param \Mni\FrontYAML\Parser $parser
  * @param array $paths
  */
 public function __construct(Parser $parser, $paths = [])
 {
     parent::__construct($paths);
     $this->parser = $parser;
 }
Ejemplo n.º 19
0
 /**
  * Constructor
  *
  * @param \phpbb\filesystem\filesystem_interface $filesystem
  * @param string|array	$paths
  */
 public function __construct(\phpbb\filesystem\filesystem_interface $filesystem, $paths = array())
 {
     $this->filesystem = $filesystem;
     parent::__construct($paths);
 }
Ejemplo n.º 20
0
 /**
  * Constructor.
  *
  * @param FileLocatorInterface        $locator  A FileLocatorInterface instance
  * @param TemplateNameParserInterface $parser   A TemplateNameParserInterface instance
  * @param string|null                 $rootPath The root path common to all relative paths (null for getcwd())
  */
 public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, $rootPath = null)
 {
     parent::__construct(array(), $rootPath);
     $this->locator = $locator;
     $this->parser = $parser;
 }
Ejemplo n.º 21
0
 public function __construct($paths, $locator = null)
 {
     parent::__construct($paths);
     $this->locator = $locator;
 }
Ejemplo n.º 22
0
 public function __construct($paths, $default_template, $base_template = true)
 {
     parent::__construct($paths);
     $this->default_template = $default_template;
     $this->base_template = $base_template;
 }
Ejemplo n.º 23
0
 public function __construct()
 {
     parent::__construct(array());
     $this->resolverCache = array();
 }
Ejemplo n.º 24
0
 public function __construct($paths, $useTimeInCacheKey = false)
 {
     parent::__construct($paths);
     $this->useTimeInCacheKey = $useTimeInCacheKey;
     $this->templateStrings = array();
 }