public function AsseticNode::__construct

Constructor.

Available attributes:

  • debug: The debug mode
  • combine: Whether to combine assets
  • var_name: The name of the variable to expose to the body node

Parameters

AssetInterface $asset The asset:

\Twig_NodeInterface $body The body node:

array $inputs An array of input strings:

array $filters An array of filter strings:

string $name The name of the asset:

array $attributes An array of attributes:

integer $lineno The line number:

string $tag The tag name:

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php, line 36

Class

AsseticNode

Namespace

Assetic\Extension\Twig

Code

public function __construct(AssetInterface $asset, \Twig_NodeInterface $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = null) {
  $nodes = array(
    'body' => $body,
  );
  $attributes = array_replace(array(
    'debug' => null,
    'combine' => null,
    'var_name' => 'asset_url',
  ), $attributes, array(
    'asset' => $asset,
    'inputs' => $inputs,
    'filters' => $filters,
    'name' => $name,
  ));
  parent::__construct($nodes, $attributes, $lineno, $tag);
}