Documentation

RequiredTokens extends AutoService 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

$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
RequiredTokens

findMissingTokens()

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').

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setRequiredTokens()

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
RequiredTokens

setTemplateTypes()

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').

Return values
RequiredTokens

        
On this page

Search results