5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Mailing/BounceType.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:41a2f33a589d43ba388d36dcf8f9e54f)
13 * Database access object for the BounceType entity.
15 class CRM_Mailing_DAO_BounceType
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_mailing_bounce_type';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = FALSE;
46 * A description of this bounce type
53 * Number of bounces of this type required before the email address is put on bounce hold
57 public $hold_threshold;
62 public function __construct() {
63 $this->__table
= 'civicrm_mailing_bounce_type';
64 parent
::__construct();
68 * Returns localized title of this entity.
71 * Whether to return the plural version of the title.
73 public static function getEntityTitle($plural = FALSE) {
74 return $plural ?
ts('Bounce Types') : ts('Bounce Type');
78 * Returns all the column names of this table
82 public static function &fields() {
83 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
84 Civi
::$statics[__CLASS__
]['fields'] = [
87 'type' => CRM_Utils_Type
::T_INT
,
88 'title' => ts('Bounce Type ID'),
90 'where' => 'civicrm_mailing_bounce_type.id',
91 'table_name' => 'civicrm_mailing_bounce_type',
92 'entity' => 'BounceType',
93 'bao' => 'CRM_Mailing_DAO_BounceType',
99 'type' => CRM_Utils_Type
::T_STRING
,
100 'title' => ts('Bounce Type Name'),
101 'description' => ts('Type of bounce'),
104 'size' => CRM_Utils_Type
::MEDIUM
,
105 'where' => 'civicrm_mailing_bounce_type.name',
106 'table_name' => 'civicrm_mailing_bounce_type',
107 'entity' => 'BounceType',
108 'bao' => 'CRM_Mailing_DAO_BounceType',
113 'name' => 'description',
114 'type' => CRM_Utils_Type
::T_STRING
,
115 'title' => ts('Bounce Type Description'),
116 'description' => ts('A description of this bounce type'),
118 'size' => CRM_Utils_Type
::HUGE
,
119 'where' => 'civicrm_mailing_bounce_type.description',
120 'table_name' => 'civicrm_mailing_bounce_type',
121 'entity' => 'BounceType',
122 'bao' => 'CRM_Mailing_DAO_BounceType',
126 'hold_threshold' => [
127 'name' => 'hold_threshold',
128 'type' => CRM_Utils_Type
::T_INT
,
129 'title' => ts('Hold Threshold'),
130 'description' => ts('Number of bounces of this type required before the email address is put on bounce hold'),
132 'where' => 'civicrm_mailing_bounce_type.hold_threshold',
133 'table_name' => 'civicrm_mailing_bounce_type',
134 'entity' => 'BounceType',
135 'bao' => 'CRM_Mailing_DAO_BounceType',
140 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
142 return Civi
::$statics[__CLASS__
]['fields'];
146 * Return a mapping from field-name to the corresponding key (as used in fields()).
149 * Array(string $name => string $uniqueName).
151 public static function &fieldKeys() {
152 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
153 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
155 return Civi
::$statics[__CLASS__
]['fieldKeys'];
159 * Returns the names of this table
163 public static function getTableName() {
164 return self
::$_tableName;
168 * Returns if this table needs to be logged
172 public function getLog() {
177 * Returns the list of fields that can be imported
179 * @param bool $prefix
183 public static function &import($prefix = FALSE) {
184 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
189 * Returns the list of fields that can be exported
191 * @param bool $prefix
195 public static function &export($prefix = FALSE) {
196 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
201 * Returns the list of indices
203 * @param bool $localize
207 public static function indices($localize = TRUE) {
209 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;