TwigFormulaLoader
in package
implements
FormulaLoaderInterface
Loads asset formulae from Twig templates.
Tags
Interfaces, Classes and Traits
- FormulaLoaderInterface
- Loads formulae.
Table of Contents
- $logger : mixed
- $twig : mixed
- __construct() : mixed
- load() : array<string|int, mixed>
- Loads formulae from a resource.
- loadNode() : array<string|int, mixed>
- Loads assets from the supplied node.
Properties
$logger
private
mixed
$logger
$twig
private
mixed
$twig
Methods
__construct()
public
__construct(Twig_Environment $twig[, LoggerInterface $logger = null ]) : mixed
Parameters
- $twig : Twig_Environment
- $logger : LoggerInterface = null
Return values
mixed —load()
Loads formulae from a resource.
public
load(ResourceInterface $resource) : array<string|int, mixed>
Formulae should be loaded the same regardless of the current debug mode. Debug considerations should happen downstream.
Parameters
- $resource : ResourceInterface
-
A resource
Return values
array<string|int, mixed> —An array of formulae
loadNode()
Loads assets from the supplied node.
private
loadNode(Twig_Node $node) : array<string|int, mixed>
Parameters
- $node : Twig_Node
Return values
array<string|int, mixed> —An array of asset formulae indexed by name