AssetsExtension
extends AbstractExtension
in package
Table of Contents
- $logger : LoggerInterface
- $plantumlRenderer : PlantumlRenderer
- __construct() : mixed
- asset() : string
- Copies the referenced asset and returns the canonical path to that asset; thus taking the BASE tag into account.
- getFilters() : array<string|int, TwigFilter>
- Returns a list of filters to add to the existing list.
- getFunctions() : array<string|int, TwigFunction>
- Returns a list of functions to add to the existing list.
- getNodeVisitors() : array<string|int, NodeVisitorInterface>
- Returns the node visitor instances to add to the existing list.
- getOperators() : array<string|int, array<string|int, mixed>>
- Returns a list of operators to add to the existing list.
- getTests() : array<string|int, TwigTest>
- Returns a list of tests to add to the existing list.
- getTokenParsers() : array<string|int, TokenParserInterface>
- Returns the token parser instances to add to the existing list.
- renderNode() : string
- uml() : string|null
- copyAsset() : string
Properties
$logger
private
LoggerInterface
$logger
$plantumlRenderer
private
PlantumlRenderer
$plantumlRenderer
Methods
__construct()
public
__construct(LoggerInterface $logger, PlantumlRenderer $plantumlRenderer) : mixed
Parameters
- $logger : LoggerInterface
- $plantumlRenderer : PlantumlRenderer
Return values
mixed —asset()
Copies the referenced asset and returns the canonical path to that asset; thus taking the BASE tag into account.
public
asset(array<string|int, mixed> $context, string $path) : string
The layout for guides includes a BASE tag in the head, which creates the need for all relative urls to actually be relative not to the current file's path; but the root of the Documentation Set. This means that, when rendering paths, you always need to include the canonical path; not that relative to the current file.
Parameters
- $context : array<string|int, mixed>
- $path : string
Return values
string —getFilters()
Returns a list of filters to add to the existing list.
public
getFilters() : array<string|int, TwigFilter>
Return values
array<string|int, TwigFilter> —getFunctions()
Returns a list of functions to add to the existing list.
public
getFunctions() : array<string|int, TwigFunction>
Return values
array<string|int, TwigFunction> —getNodeVisitors()
Returns the node visitor instances to add to the existing list.
public
getNodeVisitors() : array<string|int, NodeVisitorInterface>
Return values
array<string|int, NodeVisitorInterface> —getOperators()
Returns a list of operators to add to the existing list.
public
getOperators() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —First array of unary operators, second array of binary operators
getTests()
Returns a list of tests to add to the existing list.
public
getTests() : array<string|int, TwigTest>
Return values
array<string|int, TwigTest> —getTokenParsers()
Returns the token parser instances to add to the existing list.
public
getTokenParsers() : array<string|int, TokenParserInterface>
Return values
array<string|int, TokenParserInterface> —renderNode()
public
renderNode(array<string|int, mixed> $context, Node $node) : string
Parameters
- $context : array<string|int, mixed>
- $node : Node
Return values
string —uml()
public
uml(string $source) : string|null
Parameters
- $source : string
Return values
string|null —copyAsset()
private
copyAsset(Environment|null $environment, FilesystemInterface|null $destination, string $path) : string
Parameters
- $environment : Environment|null
- $destination : FilesystemInterface|null
- $path : string