EmailTemplate Class Reference

Inheritance diagram for EmailTemplate:
OwnedSecurableItem SecurableItem Item CustomFieldsModel RedBeanModel BeanModel ObservableComponent

Public Member Functions

 __toString ()
 isContactTemplate ()
 isWorkflowTemplate ()
 isPlainTextTemplate ()
 isPastedHtmlTemplate ()
 isBuilderTemplate ()
 isPredefinedBuilderTemplate ()
 __set ($attributeName, $value)
 validate (array $attributeNames=null, $ignoreRequiredValidator=false, $validateAll=false)

Static Public Member Functions

static getByName ($name)
static getModuleClassName ()
static getTypeDropDownArray ()
static getBuiltTypeDropDownArray ()
static renderNonEditableTypeStringContent ($type)
static getNonEditableBuiltTypeStringContent ($builtType)
static canSaveMetadata ()
static isTypeDeletable ()
static getDefaultMetadata ()
static getByType ($type, $includeDrafts=false)
static getPredefinedBuilderTemplatesSearchAttributeData ()
static getPredefinedBuilderTemplates ()
static getPreviouslyCreatedBuilderTemplateSearchAttributeData ($modelClassName=null, $includeDrafts=false)
static getPreviouslyCreatedBuilderTemplates ($modelClassName=null, $includeDrafts=false, $limit=null)
static getDataAndLabelsByType ($type)
static getGamificationRulesType ()
static hasReadPermissionsOptimization ()

Data Fields

const TYPE_WORKFLOW = 1
const TYPE_CONTACT = 2
const BUILT_TYPE_PLAIN_TEXT_ONLY = 1
const BUILT_TYPE_PASTED_HTML = 2
const BUILT_TYPE_BUILDER_TEMPLATE = 3

Static Protected Member Functions

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

Detailed Description

Definition at line 37 of file EmailTemplate.php.


Member Function Documentation

static getByName ( name  )  [static]

Gets by name

Parameters:
string $name
Returns:
string

Reimplemented from Item.

Definition at line 55 of file EmailTemplate.php.

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

Returns the display name for the model class. Defaults to the module label. Override if the model label is not the module label. Make sure to return a translated label. Also provides fall back in moduleClassName is null.

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

Reimplemented from RedBeanModel.

Definition at line 65 of file EmailTemplate.php.

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

Returns the display name for plural of the model class.

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

Reimplemented from RedBeanModel.

Definition at line 75 of file EmailTemplate.php.

__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 117 of file EmailTemplate.php.

static canSaveMetadata (  )  [static]

By default models cannot save their metadata, allowing them to be loaded quickly because the loading of of metadata can be avoided as much as possible. To make a model able to save its metadata override this method to return true. PUT it before the getDefaultMetadata in the derived class.

Reimplemented from RedBeanModel.

Definition at line 133 of file EmailTemplate.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 OwnedSecurableItem.

Definition at line 138 of file EmailTemplate.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 OwnedSecurableItem.

Definition at line 143 of file EmailTemplate.php.

static getByType ( type,
includeDrafts = false 
) [static]
Parameters:
$type 
bool $includeDrafts
Returns:
Array

Definition at line 207 of file EmailTemplate.php.

static getPredefinedBuilderTemplatesSearchAttributeData (  )  [static]

Returns the SearchAttributeData array to search for all predefinedBuilderTemplates

Returns:
array

Definition at line 242 of file EmailTemplate.php.

static getPredefinedBuilderTemplates (  )  [static]

Returns PredefinedTemplates

Returns:
Array of EmailTemplate models

Definition at line 265 of file EmailTemplate.php.

static getPreviouslyCreatedBuilderTemplateSearchAttributeData ( modelClassName = null,
includeDrafts = false 
) [static]

Returns the SearchAttributeData array to search for all previouslyCreatedBuilderTemplates

Parameters:
null $modelClassName
bool $includeDrafts
Returns:
array

Definition at line 279 of file EmailTemplate.php.

static getPreviouslyCreatedBuilderTemplates ( modelClassName = null,
includeDrafts = false,
limit = null 
) [static]
Parameters:
null $modelClassName
bool $includeDrafts
null $limit number of previously created templates
Returns:
Array of EmailTemplate models

Definition at line 325 of file EmailTemplate.php.

static getDataAndLabelsByType ( type  )  [static]
Parameters:
int $type
Returns:
array

Definition at line 337 of file EmailTemplate.php.

static getGamificationRulesType (  )  [static]
Returns:
string of gamificationRulesType Override for a child class as needed.

Reimplemented from Item.

Definition at line 354 of file EmailTemplate.php.

static hasReadPermissionsOptimization (  )  [static]

Override on any models you want to utilize ReadPermissionsOptimization

Reimplemented from SecurableItem.

Definition at line 359 of file EmailTemplate.php.

__set ( attributeName,
value 
)

Sets the members and relations of the model as if they were actual attributes of the model. For example, if Account extends RedBeanModel and its attributeNames() returns that one it has a member 'name' and a relation 'owner' they are simply accessed as:

   $account = new Account();
   $account->name = 'International Corp';
   $account->owner = User::getByUsername('bill');
   $account->save();
Parameters:
$attributeName A non-empty string that is the name of a member or relation of the model.
$value A value or model of the type specified as valid for the member or relation by the meta data supplied by the extending class's getMetadata() method.

Reimplemented from OwnedSecurableItem.

Definition at line 409 of file EmailTemplate.php.


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