Documentation

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

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 "", and if another module defines $angularModules['otherMod']['exports']['el'][0] === 'other-el', then the 'otherMod' is automatically required.

Parameters
$afform : array<string|int, mixed>
Tags
see
CRM_Utils_Hook::angularModules()

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
Return values
array<string|int, mixed>

        
On this page

Search results