AngularDependencyMapper
in package
Class used to calculate Afform Angular dependencies.
Table of Contents
Properties
- $revMap : array{attr: array, el: array}
Methods
- __construct() : mixed
- autoReq() : mixed
- Adds angular dependencies based on the html contents of an afform.
- getRevMap() : array{attr: array, el: array}
- reverseDepsFind() : array<string|int, mixed>
Properties
$revMap
private
array{attr: array, el: array}
$revMap
Methods
__construct()
public
__construct(array<string|int, mixed> $angularModules) : mixed
Parameters
- $angularModules : array<string|int, mixed>
autoReq()
Adds angular dependencies based on the html contents of an afform.
public
autoReq(array<string|int, mixed> $afform) : mixed
TLDR: if an afform uses element "$angularModules['otherMod']['exports']['el'][0] === 'other-el'
, then
the 'otherMod' is automatically required.
Parameters
- $afform : array<string|int, mixed>
Tags
getRevMap()
private
getRevMap(array<string|int, mixed> $angularModules) : array{attr: array, el: array}
Parameters
- $angularModules : array<string|int, mixed>
Return values
array{attr: array, el: array} —'attr': [string $attrName => string $angModuleName] 'el': [string $elementName => string $angModuleName]
reverseDepsFind()
private
reverseDepsFind(string $html) : array<string|int, mixed>
Parameters
- $html : string