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:3870b655b29d0264bd4915d3c93a3018)
13 * Database access object for the BounceType entity.
15 class CRM_Mailing_DAO_BounceType
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_mailing_bounce_type';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
44 * A description of this bounce type
51 * Number of bounces of this type required before the email address is put on bounce hold
55 public $hold_threshold;
60 public function __construct() {
61 $this->__table
= 'civicrm_mailing_bounce_type';
62 parent
::__construct();
66 * Returns localized title of this entity.
68 public static function getEntityTitle() {
69 return ts('Bounce Types');
73 * Returns all the column names of this table
77 public static function &fields() {
78 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
79 Civi
::$statics[__CLASS__
]['fields'] = [
82 'type' => CRM_Utils_Type
::T_INT
,
83 'title' => ts('Bounce Type ID'),
85 'where' => 'civicrm_mailing_bounce_type.id',
86 'table_name' => 'civicrm_mailing_bounce_type',
87 'entity' => 'BounceType',
88 'bao' => 'CRM_Mailing_DAO_BounceType',
93 'type' => CRM_Utils_Type
::T_STRING
,
94 'title' => ts('Bounce Type Name'),
95 'description' => ts('Type of bounce'),
98 'size' => CRM_Utils_Type
::MEDIUM
,
99 'where' => 'civicrm_mailing_bounce_type.name',
100 'table_name' => 'civicrm_mailing_bounce_type',
101 'entity' => 'BounceType',
102 'bao' => 'CRM_Mailing_DAO_BounceType',
106 'name' => 'description',
107 'type' => CRM_Utils_Type
::T_STRING
,
108 'title' => ts('Bounce Type Description'),
109 'description' => ts('A description of this bounce type'),
111 'size' => CRM_Utils_Type
::HUGE
,
112 'where' => 'civicrm_mailing_bounce_type.description',
113 'table_name' => 'civicrm_mailing_bounce_type',
114 'entity' => 'BounceType',
115 'bao' => 'CRM_Mailing_DAO_BounceType',
118 'hold_threshold' => [
119 'name' => 'hold_threshold',
120 'type' => CRM_Utils_Type
::T_INT
,
121 'title' => ts('Hold Threshold'),
122 'description' => ts('Number of bounces of this type required before the email address is put on bounce hold'),
124 'where' => 'civicrm_mailing_bounce_type.hold_threshold',
125 'table_name' => 'civicrm_mailing_bounce_type',
126 'entity' => 'BounceType',
127 'bao' => 'CRM_Mailing_DAO_BounceType',
131 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
133 return Civi
::$statics[__CLASS__
]['fields'];
137 * Return a mapping from field-name to the corresponding key (as used in fields()).
140 * Array(string $name => string $uniqueName).
142 public static function &fieldKeys() {
143 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
144 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
146 return Civi
::$statics[__CLASS__
]['fieldKeys'];
150 * Returns the names of this table
154 public static function getTableName() {
155 return self
::$_tableName;
159 * Returns if this table needs to be logged
163 public function getLog() {
168 * Returns the list of fields that can be imported
170 * @param bool $prefix
174 public static function &import($prefix = FALSE) {
175 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
180 * Returns the list of fields that can be exported
182 * @param bool $prefix
186 public static function &export($prefix = FALSE) {
187 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
192 * Returns the list of indices
194 * @param bool $localize
198 public static function indices($localize = TRUE) {
200 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;