Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Accounts
  • Actions
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CouponTerms
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • EmailVerifications
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • MessageGroups
  • Messages
  • MessengerManager
  • ModuleClientMeta
  • ModuleManager
  • ModuleTypes
  • Navigation
  • PackageGroups
  • PackageOptionGroups
  • PackageOptions
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Pricings
  • ReportManager
  • ServiceChanges
  • ServiceInvoices
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • SystemEvents
  • Taxes
  • Themes
  • Transactions
  • Users
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class MessageGroups

Message Groups

Model
Extended by AppModel uses Blesta\Core\Util\Common\Traits\Container
Extended by MessageGroups
Package: blesta\app\models
Copyright: Copyright (c) 2020, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/message_groups.php
Methods summary
public
# __construct( )

Initialize MessageGroups

Initialize MessageGroups

Overrides

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

Adds a message group

Adds a message group

Parameters

$vars

An array of message info including:

  • action The message group action
  • type The message group type (optional)
  • plugin_dir The directory name of the plugin where the message group belongs
  • tags Tags that apply to this group (optional, default null)

Returns

integer
The ID for this message group
public
# edit( integer $message_group_id, array $vars )

Edits an existing message group

Edits an existing message group

Parameters

$message_group_id
The ID of the message group to update
$vars

An array of message info including:

  • action The message group action
  • type The message group type (optional)
  • plugin_dir The directory name of the plugin where the message group belongs
  • tags Tags that apply to this group (optional, default null)
public
# delete( integer $message_group_id )

Deletes an existing message group

Deletes an existing message group

Parameters

$message_group_id
The message group ID to delete
public mixed
# get( integer $message_group_id )

Fetches an existing message

Fetches an existing message

Parameters

$message_group_id
The ID of the message group to fetch

Returns

mixed
A stdClass object representing the message group if it exists, false otherwise
public array
# getAll( array $filters = [] )

Fetches a full list of all message groups

Fetches a full list of all message groups

Parameters

$filters

A list of parameters to filter by, including:

  • plugin_dir The directory name of the plugin to fetch message groups for

Returns

array
A list of stdClass objects representing all message groups
public array
# getAllMessages( integer $company_id, string $type = 'client', boolean $core = true, string $lang = null )

Fetches a list of all messages and message groups under a company for a specific type and language

Fetches a list of all messages and message groups under a company for a specific type and language

Parameters

$company_id
The company ID to fetch message groups for
$type

The type of message group to get, "client", "staff", "shared" or null to fetch all types (optional, default "client")

$core

True to fetch all core message groups, or false to fetch all plugin-related message groups (optional, default true)

$lang

The language in ISO 636-1 2-char + "_" + ISO 3166-1 2-char (e.g. en_us) (optional, defaults to default language)

Returns

array
A list of stdClass objects representing the messages
public mixed
# getByAction( string $action )

Fetches a message group

Fetches a message group

Parameters

$action
The action of message group to fetch

Returns

mixed
An stdClass object representing the message group, or false if one does not exist
public array
# getTypes( )

Returns a list of the supported message group types

Returns a list of the supported message group types

Returns

array
A list of the supported message group types
Methods inherited from AppModel
_(), boolToInt(), currencyToDecimal(), dateToUtc(), errors(), getPerPage(), ifSet(), loadCrypto(), setDefaultIfEmpty(), setPerPage(), setRulesIfSet(), strToBool(), systemDecrypt(), systemEncrypt(), systemHash(), truncateDecimal(), validateExists(), validateStateCountry()
Methods used from Blesta\Core\Util\Common\Traits\Container
getFromContainer()
Properties inherited from AppModel
$logger, $replacement_keys
Blesta API documentation generated by ApiGen