Newsletter
extends BaseContent
in package
Uses
RangeActive
Define system newsletter object
Tags
Table of Contents
- $_test_users : array<string|int, mixed>|null
- $instance : NewsletterController|null
- __construct() : mixed
- Newsletter constructor.
- Controller() : NewsletterController|null
- IsActive() : bool
- Check is active state
- Save() : Result|null
- Save changes and clear local caches
- StaticAttachments() : array<string|int, mixed>
- Support static attachments to be added to the emails on the fly
- TestUsers() : array<string|int, mixed>
- TimePoints() : array<string|int, array<string|int, mixed>>
- Fetch time points this action will trigger relative to a given start date
Properties
$_test_users
private
array<string|int, mixed>|null
$_test_users
= null
$instance
private
NewsletterController|null
$instance
= null
Methods
__construct()
Newsletter constructor.
public
__construct([null|string $id = null ][, null|string $language = null ]) : mixed
Parameters
- $id : null|string = null
-
The newsletter id
- $language : null|string = null
-
The local language or null
Return values
mixed —Controller()
public
Controller() : NewsletterController|null
Return values
NewsletterController|null —IsActive()
Check is active state
public
IsActive([array<string|int, mixed>|null $row = null ][, string $from = 'datefrom' ][, string $to = 'dateto' ][, int|null $now = null ]) : bool
Check if the element is active and valid at the current time
Parameters
- $row : array<string|int, mixed>|null = null
- $from : string = 'datefrom'
- $to : string = 'dateto'
- $now : int|null = null
Return values
bool —Entry is active based on date from and date to property
Save()
Save changes and clear local caches
public
Save([false $force_new_id = false ]) : Result|null
Parameters
- $force_new_id : false = false
Return values
Result|null —StaticAttachments()
Support static attachments to be added to the emails on the fly
public
StaticAttachments() : array<string|int, mixed>
Return values
array<string|int, mixed> —TestUsers()
public
TestUsers() : array<string|int, mixed>
Return values
array<string|int, mixed> —TimePoints()
Fetch time points this action will trigger relative to a given start date
public
TimePoints([DateTime|null $start = null ]) : array<string|int, array<string|int, mixed>>
Parameters
- $start : DateTime|null = null
Return values
array<string|int, array<string|int, mixed>> —The time points in utc