Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Accounts
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • ModuleManager
  • Navigation
  • PackageGroups
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • Taxes
  • Themes
  • Transactions
  • Users

Class EmailGroups

Email Group management

Model
Extended by AppModel
Extended by EmailGroups
Package: blesta\app\models
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/email_groups.php

Methods summary

public
# __construct( )

Initialize Email Groups

Initialize Email Groups

Overrides

AppModel::__construct
public mixed
# add( array $vars )

Adds an email group

Adds an email group

Parameters

$vars
array
$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') -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

mixed
The email group ID, or void on error
public
# edit( array $id, array $vars )

Updates an email group

Updates an email group

Parameters

$id
array
$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') -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

Deletes an email group

Parameters

$id
integer
$id The email group ID
public mixed
# getByAction( string $action )

Fetches an email group

Fetches an email group

Parameters

$action
string
$action The type of email group to fetch

Returns

mixed
An 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

$type
string
$type The type of email groups to fetch, one of the following (optional, default "client") - client - staff - shared
$core
boolean
$core True to fetch all core email groups, or false to fetch all plugin-related email groups

Returns

array
A list of stdClass objects representing email groups
public array
# getAllEmails( integer $company_id, string $type = "client", string $core = true )

Fetches a list of all emails and email groups under a company for a specific type

Fetches a list of all emails and email groups under a company for a specific type

Parameters

$company_id
integer
$company_id The company ID to fetch email groups for
$type
string
$type The type of email group to get, "client", "staff", "shared" (optional, default "client")
$core
string
$core True to fetch all core email groups, or false to fetch all plugin-related email groups

Returns

array
A 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

$type
string
$type The type

Returns

boolean
True if type is validated, false otherwise
private array
# getRules( )

Returns the rule set for adding/editing email groups

Returns the rule set for adding/editing email groups

Returns

array
Email group rules

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

Blesta API documentation generated by ApiGen 2.8.0