RequiredFields
extends AutoService
in package
uses
IsActiveTrait
Class RequiredFields
Table of Contents
Properties
Methods
- __construct() : mixed
- RequiredFields constructor.
- factory() : RequiredFields
- getFields() : array<string|int, mixed>
- Get the list of required fields.
- isActive() : bool
- onCheckSendable() : mixed
- Check for required fields.
- setActive() : $this
- setFields() : RequiredFields
- Set the list of required fields.
- hasAny() : bool
- Determine if $object has any of the given properties.
Properties
$active
private
bool
$active
= TRUE
$fields
private
array<string|int, mixed>
$fields
Ex: array('subject', 'from_name', '(body_html|body_text)').
Methods
__construct()
RequiredFields constructor.
public
__construct(array<string|int, mixed> $fields) : mixed
Parameters
- $fields : array<string|int, mixed>
factory()
public
static factory() : RequiredFields
Tags
Return values
RequiredFieldsgetFields()
Get the list of required fields.
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —Ex: array('subject', 'from_name', '(body_html|body_text)').
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
$thissetFields()
Set the list of required fields.
public
setFields(array<string|int, mixed> $fields) : RequiredFields
Parameters
- $fields : array<string|int, mixed>
-
Ex: array('subject', 'from_name', '(body_html|body_text)').
Return values
RequiredFieldshasAny()
Determine if $object has any of the given properties.
protected
hasAny(mixed $object, array<string|int, mixed> $alternatives) : bool
Parameters
- $object : mixed
- $alternatives : array<string|int, mixed>