RequiredTokens
extends AutoService
in package
uses
IsActiveTrait
Class RequiredTokens
Table of Contents
Properties
- $active : bool
- $requiredTokens : array<string|int, mixed>
- $templateTypes : array<string|int, mixed>
Methods
- __construct() : mixed
- RequiredTokens constructor.
- addTemplateTypes() : RequiredTokens
- Add to the list of template-types for which we check tokens.
- factory() : RequiredTokens
- findMissingTokens() : mixed
- getRequiredTokens() : array<string|int, mixed>
- getTemplateTypes() : array<string|int, mixed>
- isActive() : bool
- onCheckSendable() : mixed
- Check for required fields.
- setActive() : $this
- setRequiredTokens() : RequiredTokens
- setTemplateTypes() : RequiredTokens
- Set the list of template-types for which we check tokens.
Properties
$active
private
bool
$active
= TRUE
$requiredTokens
private
array<string|int, mixed>
$requiredTokens
Ex: array('domain.address' => ts('The organizational postal address'))
$templateTypes
private
array<string|int, mixed>
$templateTypes
List of template-types for which we are capable of enforcing token requirements.
Methods
__construct()
RequiredTokens constructor.
public
__construct(array<string|int, mixed> $templateTypes, array<string|int, mixed> $requiredTokens) : mixed
Parameters
- $templateTypes : array<string|int, mixed>
-
Ex: array('traditional').
- $requiredTokens : array<string|int, mixed>
-
Ex: array('domain.address' => ts('The organizational postal address'))
addTemplateTypes()
Add to the list of template-types for which we check tokens.
public
addTemplateTypes(array<string|int, mixed> $templateTypes) : RequiredTokens
Parameters
- $templateTypes : array<string|int, mixed>
-
Ex: array('traditional').
Return values
RequiredTokensfactory()
public
static factory() : RequiredTokens
Tags
Return values
RequiredTokensfindMissingTokens()
public
findMissingTokens(mixed $str) : mixed
Parameters
- $str : mixed
getRequiredTokens()
public
getRequiredTokens() : array<string|int, mixed>
Return values
array<string|int, mixed> —Ex: array('domain.address' => ts('The organizational postal address'))
getTemplateTypes()
public
getTemplateTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —Ex: array('traditional').
isActive()
public
isActive() : bool
Return values
boolonCheckSendable()
Check for required fields.
public
onCheckSendable(CheckSendableEvent $e) : mixed
Parameters
- $e : CheckSendableEvent
setActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetRequiredTokens()
public
setRequiredTokens(array<string|int, mixed> $requiredTokens) : RequiredTokens
Parameters
- $requiredTokens : array<string|int, mixed>
-
Ex: array('domain.address' => ts('The organizational postal address'))
Return values
RequiredTokenssetTemplateTypes()
Set the list of template-types for which we check tokens.
public
setTemplateTypes(array<string|int, mixed> $templateTypes) : RequiredTokens
Parameters
- $templateTypes : array<string|int, mixed>
-
Ex: array('traditional').