EmailSetup
extends NamedBaseContent
in package
Implement email setup object
In the fileAccess context most contents are children of the base class. With this class the DAB for email setups is implemented. A email setup is a named object
Tags
Table of Contents
- $ : string|null
- $ : string|null
- $keyregex : string
- the main key must match this regex
- __construct() : mixed
- Email setup Construct a new email setup object
- BasicMailData() : array<string|int, mixed>
- Convert to basic data for new email
- CarbonCopyReceivers() : array<string|int, mixed>
- Get cc receivers Parse the local storage data and return the list of registered cc receivers.
- Copy() : Result
- copy entity in file system and git repository this method can copy this content object in our local storage system to a new one
- Delete() : Result
- delete entity from file system and git repository this method can delete this content object from our local storage system
- GetPath() : string|null
- Save() : Result
- Helper function to disable fetching of ids for this kind of content
- Template() : Template|null
- Get the template instance
- UpdateAttributeKey() : Result
- Callback on update validate name This function is called when the primary identifyer is changed, is called from objecthandler->updateentity
Properties
$
public
string|null
$
override_timezone
$
public
string|null
$
override_language
$keyregex
the main key must match this regex
private
string
$keyregex
= '/^[a-z0-9\\-]+$/'
Methods
__construct()
Email setup Construct a new email setup object
public
__construct([string $id = null ][, string $language = null ]) : mixed
Parameters
- $id : string = null
-
The object name/id or null for new one
- $language : string = null
-
The object language or null for raw one
Return values
mixed —BasicMailData()
Convert to basic data for new email
public
BasicMailData([string|null $language = FAA_DEFAULT_LANGUAGE ][, bool $include_receiver = false ][, bool $default_subject = false ]) : array<string|int, mixed>
Take local values and generate the basic update patch data set for new emails
Parameters
- $language : string|null = FAA_DEFAULT_LANGUAGE
-
A language id
- $include_receiver : bool = false
-
Include th default receiver on the fly
- $default_subject : bool = false
-
Use the default subject
Return values
array<string|int, mixed> —The patch data
CarbonCopyReceivers()
Get cc receivers Parse the local storage data and return the list of registered cc receivers.
public
CarbonCopyReceivers() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of registered receivers
Copy()
copy entity in file system and git repository this method can copy this content object in our local storage system to a new one
public
Copy([string $target = null ]) : Result
Parameters
- $target : string = null
-
The target name
Return values
Result —A default system result set
Delete()
delete entity from file system and git repository this method can delete this content object from our local storage system
public
Delete([bool $skip = false ]) : Result
Parameters
- $skip : bool = false
-
Skip hooks on demand
Return values
Result —A default system result set
GetPath()
public
GetPath() : string|null
Tags
Return values
string|null —Save()
Helper function to disable fetching of ids for this kind of content
public
Save([bool $force_new_id = false ]) : Result
Parameters
- $force_new_id : bool = false
Return values
Result —Template()
Get the template instance
public
Template() : Template|null
Return values
Template|null —UpdateAttributeKey()
Callback on update validate name This function is called when the primary identifyer is changed, is called from objecthandler->updateentity
public
UpdateAttributeKey(object $attr, string $data) : Result
Parameters
- $attr : object
-
The changed attribute
- $data : string
-
The new attribute value
Return values
Result —A system result object