Class EmailGroups
	
	
		- 
			Model
			
			
			
		
- 
			 AppModel AppModel
- 
			 EmailGroups EmailGroups
Methods summary
		
		
			| 
				 public 
				
				
				 | 
			#
			__construct( )
				
Initialize Email Groups Overrides | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			add( array $vars )
				
Adds an email group Parameters
						$varsarray$vars An array of variable email group info, including: - action A unique action
- type The type of user this email group applies to (optional, default 'client')
- notice_type The type of notice this email is for ('bcc', 'to', or null for
none; optional, default null) - plugin_dir The directory where the plugin
resides that is associated with this email group (optional) - tags Tags that
apply to this group (optional, default NULL)
Returns
						mixedThe email group ID, or void on error
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			edit( array $id, array $vars )
				
Updates an email group Parameters
						$idarray$vars An array of variable email group info, including: - action A unique action
- type The type of user this email group applies to (optional, default 'client')
- notice_type The type of notice this email is for ('bcc', 'to', or null for
none; optional) - plugin_dir The directory where the plugin resides that is
associated with this email group (optional) - tags Tags that apply to this group
(optional, default NULL)
$vars | 
		
			| 
				 public 
				
				
				 | 
			#
			delete( integer $id )
				
Deletes an email group Parameters
						$idinteger$id The email group ID
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getByAction( string $action )
				
Fetches an email group Parameters
						$actionstring$action The type of email group to fetch
Returns
						mixedAn stdClass object representing the email group, or false if one does not exist
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getAll( string $type = "client", boolean $core = true )
				
Fetches a list of all email groups irrespective of company 
				
Fetches a list of all email groups irrespective of company Parameters
						$typestring$type The type of email groups to fetch, one of the following (optional, default
"client") - client - staff - shared
$coreboolean$core True to fetch all core email groups, or false to fetch all plugin-related
email groups
Returns
						arrayA list of stdClass objects representing email groups
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getAllByNoticeType( mixed $notice_type, string $type = null, string $core = true )
				
Fetches a list of all email groups by the notice type 
				
Fetches a list of all email groups by the notice type Parameters
						$notice_typemixed$notice_type A string representing the notice type to fetch, one of the
following: - bcc The BCC type - to The To type - null
$typestring$type The type of email groups to fetch, one of the following (optional) -
client - staff - shared
$corestring$core True to fetch all core email groups, or false to fetch all plugin-related
email groups (optional, default true)
Returns
						arrayA list of stdClass objects representing email groups
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getAllEmails( integer $company_id, string $type = "client", string $core = true, string $lang = null )
				
Fetches a list of all emails and email groups under a company for a specific
type and language 
				
Fetches a list of all emails and email groups under a company for a specific
type and language Parameters
						$company_idinteger$company_id The company ID to fetch email groups for
$typestring$type The type of email group to get, "client", "staff", "shared" (optional,
default "client")
$corestring$core True to fetch all core email groups, or false to fetch all plugin-related
email groups (optional, default true)
$langstring$lang The language in ISO 636-1 2-char + "_" + ISO 3166-1 2-char (e.g. en_us)
(optional, defaults to default language)
Returns
						arrayA list of stdClass objects representing emails
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateType( string $type )
				
Validates an email group's 'type' field 
				
Validates an email group's 'type' field Parameters
						$typestring$type The type
Returns
						booleanTrue if type is validated, false otherwise
 
 | 
		
		Methods inherited from AppModel
		
			_(), 
			boolToInt(), 
			currencyToDecimal(), 
			dateToUtc(), 
			errors(), 
			getPerPage(), 
			ifSet(), 
			loadCrypto(), 
			setDefaultIfEmpty(), 
			setPerPage(), 
			setRulesIfSet(), 
			strToBool(), 
			systemDecrypt(), 
			systemEncrypt(), 
			systemHash(), 
			truncateDecimal(), 
			validateExists(), 
			validateStateCountry()
		
		Methods inherited from Model
		
			affectedRows(), 
			begin(), 
			commit(), 
			getConnection(), 
			lastInsertId(), 
			makeDSN(), 
			prepare(), 
			query(), 
			rollBack(), 
			setAttribute(), 
			setFetchMode()
		
		Magic methods summary
		Properties summary
		Properties inherited from AppModel
		
			$replacement_keys