KMP PHP API Reference

EmailTemplate extends BaseEntity
in package

EmailTemplate Entity

Table of Contents

Properties

$action_method  : string
$available_vars  : array<string|int, mixed>|null
$branch_id  : int|null
$created  : DateTime|null
$html_template  : string|null
$id  : int
$is_active  : bool
$mailer_class  : string
$modified  : DateTime|null
$subject_template  : string
$text_template  : string|null
$_accessible  : array<string, bool>
Fields that can be mass assigned using newEntity() or patchEntity().

Methods

getBranchId()  : int|null
Get the branch ID for authorization checks.
_getAvailableVars()  : array<string|int, mixed>
Getter for available_vars to ensure it's always an array
_getDisplayName()  : string
Virtual field for display name
_setAvailableVars()  : array<string|int, mixed>|null
Setter for available_vars to ensure proper format The JSON database type will handle the actual JSON encoding

Properties

$available_vars

public array<string|int, mixed>|null $available_vars

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$_accessible

Fields that can be mass assigned using newEntity() or patchEntity().

protected array<string, bool> $_accessible = ['mailer_class' => true, 'action_method' => true, 'subject_template' => true, 'html_template' => true, 'text_template' => true, 'available_vars' => true, 'is_active' => true, 'created' => false, 'modified' => false]

Methods

getBranchId()

Get the branch ID for authorization checks.

public getBranchId() : int|null

Child classes should override for complex branch relationships.

Return values
int|null

The branch ID, or null if no association

_getAvailableVars()

Getter for available_vars to ensure it's always an array

protected _getAvailableVars(mixed $value) : array<string|int, mixed>
Parameters
$value : mixed
Return values
array<string|int, mixed>

_getDisplayName()

Virtual field for display name

protected _getDisplayName() : string
Return values
string

_setAvailableVars()

Setter for available_vars to ensure proper format The JSON database type will handle the actual JSON encoding

protected _setAvailableVars(mixed $value) : array<string|int, mixed>|null
Parameters
$value : mixed
Return values
array<string|int, mixed>|null

        
On this page

Search results