PA_NewsletterType
in package
The PuzzleAnywhere NewsletterType class. It allows for retrieving newsletter type data.
Table of Contents
- $description : string
- The newsletter type description.
- $id : int
- The `NewsletterType` ID.
- $name : string
- The name of the newsletter type.
- $requires_subscription : bool
- Denotes whether the newsletter type requires a subscription to access.
- $subscribed : bool
- Denotes whether the newsletter type requires a subscription.
- get() : PA_NewsletterType
- Retrieves a newsletter type record.
- get_all() : array<string|int, PA_NewsletterType>
- Retrieves all available newsletter type record.
- get_all_available_by_token() : array<string|int, PA_NewsletterType>
- Retrieve all available newsletter types by token.
- get_by_token() : array<string|int, PA_NewsletterType>
- Retrieve newsletter types by token.
- unsubscribe_from_all_by_token() : null
- Unsubscribe from all newsletter types by token.
- update_by_token() : null
- Update newsletter type subscriptions by token.
Properties
$description
The newsletter type description.
public
string
$description
$id
The `NewsletterType` ID.
public
int
$id
$name
The name of the newsletter type.
public
string
$name
$requires_subscription
Denotes whether the newsletter type requires a subscription to access.
public
bool
$requires_subscription
$subscribed
Denotes whether the newsletter type requires a subscription.
public
bool
$subscribed
Methods
get()
Retrieves a newsletter type record.
public
static get(int $id) : PA_NewsletterType
Parameters
- $id : int
-
The newsletter type ID.
Return values
PA_NewsletterType —The newsletter type.
get_all()
Retrieves all available newsletter type record.
public
static get_all() : array<string|int, PA_NewsletterType>
Return values
array<string|int, PA_NewsletterType> —An array of newsletter types.
get_all_available_by_token()
Retrieve all available newsletter types by token.
public
static get_all_available_by_token(string $token) : array<string|int, PA_NewsletterType>
Parameters
- $token : string
-
The newsletter types token
Return values
array<string|int, PA_NewsletterType> —get_by_token()
Retrieve newsletter types by token.
public
static get_by_token(string $token) : array<string|int, PA_NewsletterType>
Parameters
- $token : string
-
The newsletter types token
Return values
array<string|int, PA_NewsletterType> —unsubscribe_from_all_by_token()
Unsubscribe from all newsletter types by token.
public
static unsubscribe_from_all_by_token(string $token) : null
Parameters
- $token : string
-
The subscription token.
Return values
null —update_by_token()
Update newsletter type subscriptions by token.
public
static update_by_token(string $token[, mixed $newsletter_types = [] ][, mixed $email_offers = false ]) : null
Parameters
- $token : string
-
The newsletter types token
- $newsletter_types : mixed = []
- $email_offers : mixed = false