Drupal 8  8.0.2
FilesystemLoader Class Reference
Inheritance diagram for FilesystemLoader:

Public Member Functions

 __construct ($paths=array(), ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler)
 
 addPath ($path, $namespace=self::MAIN_NAMESPACE)
 

Detailed Description

Loads templates from the filesystem.

This loader adds module and theme template paths as namespaces to the Twig filesystem loader so that templates can be referenced by namespace, like /block.html.twig or /page.html.twig.

Constructor & Destructor Documentation

__construct (   $paths = array(),
ModuleHandlerInterface  $module_handler,
ThemeHandlerInterface  $theme_handler 
)

Constructs a new FilesystemLoader object.

Parameters
string | array$pathsA path or an array of paths to check for templates.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler service.
\Drupal\Core\Extension\ThemeHandlerInterface$theme_handlerThe theme handler service.

References FilesystemLoader\addPath(), ModuleHandlerInterface\getModuleList(), and ThemeHandlerInterface\listInfo().

Here is the call graph for this function:

Member Function Documentation

addPath (   $path,
  $namespace = self::MAIN_NAMESPACE 
)

Adds a path where templates are stored.

Parameters
string$pathA path where to look for templates.
string$namespace(optional) A path name.

References Drupal\cache().

Referenced by FilesystemLoader\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: