EmailAccount Class Reference

Inheritance diagram for EmailAccount:
Item CustomFieldsModel RedBeanModel BeanModel ObservableComponent

Public Member Functions

 __toString ()
 validateCustomOutboundSettings ($attribute, $params)
 afterValidate ()

Static Public Member Functions

static getModuleClassName ()
static getByUserAndName (User $user, $name=null)
static resolveAndGetByUserAndName (User $user, $name=null)
static getDefaultMetadata ()
static isTypeDeletable ()

Data Fields

const DEFAULT_NAME = 'Default'

Static Protected Member Functions

static getLabel ($language=null)
static getPluralLabel ($language=null)
static translatedAttributeLabels ($language)

Detailed Description

Model for user's email accounts

Definition at line 40 of file EmailAccount.php.


Member Function Documentation

__toString (  ) 

Returns the displayable string for the class. Should be overridden in any model that can provide a meaningful string representation of itself.

Returns:
A string.

Reimplemented from RedBeanModel.

Definition at line 44 of file EmailAccount.php.

static getByUserAndName ( User user,
name = null 
) [static]
Parameters:
User $user
mixed $name null or String representing the email account name

Definition at line 62 of file EmailAccount.php.

static resolveAndGetByUserAndName ( User user,
name = null 
) [static]

Attempt to get the email account for a given user. If it does not exist, make a default EmailAccount and return it.

Parameters:
User $user
mixed $name null or String representing the email account name
Returns:
EmailAccount

Definition at line 95 of file EmailAccount.php.

static getDefaultMetadata (  )  [static]

Returns the default meta data for the class. It must be appended to the meta data from the parent model, if any.

Reimplemented from Item.

Definition at line 119 of file EmailAccount.php.

static isTypeDeletable (  )  [static]

To be overriden on intermediate derived classes to return false so that deletes are not done on intermediate classes because the object relational mapping will not clean up properly. For example if User is a Person, and Person is a RedBeanModel delete should be called only on User, not on Person. So User must override isDeletable to return false.

Reimplemented from Item.

Definition at line 174 of file EmailAccount.php.

static getLabel ( language = null  )  [static, protected]

Returns the display name for the model class.

Parameters:
null | string $language
Returns:
dynamic label name based on module.

Reimplemented from RedBeanModel.

Definition at line 184 of file EmailAccount.php.

static getPluralLabel ( language = null  )  [static, protected]

Returns the display name for plural of the model class.

Parameters:
null | string $language
Returns:
dynamic label name based on module.

Reimplemented from RedBeanModel.

Definition at line 194 of file EmailAccount.php.

validateCustomOutboundSettings ( attribute,
params 
)

When the useCustomOutboundSettings is checked, then other attributes become required

Parameters:
string $attribute
array $params

Definition at line 226 of file EmailAccount.php.

afterValidate (  ) 

Encrypt password beforeSave

Reimplemented from RedBeanModel.

Definition at line 245 of file EmailAccount.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Apr 26 07:10:25 2017