5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Mailing/BounceType.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:317021d6e37d4d4d6fd91e15aaef8f93)
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 static $_tableName = 'civicrm_mailing_bounce_type';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 all the column names of this table
70 public static function &fields() {
71 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
72 Civi
::$statics[__CLASS__
]['fields'] = [
75 'type' => CRM_Utils_Type
::T_INT
,
76 'title' => ts('Bounce Type ID'),
78 'table_name' => 'civicrm_mailing_bounce_type',
79 'entity' => 'BounceType',
80 'bao' => 'CRM_Mailing_DAO_BounceType',
85 'type' => CRM_Utils_Type
::T_STRING
,
86 'title' => ts('Bounce Type Name'),
87 'description' => ts('Type of bounce'),
90 'size' => CRM_Utils_Type
::MEDIUM
,
91 'table_name' => 'civicrm_mailing_bounce_type',
92 'entity' => 'BounceType',
93 'bao' => 'CRM_Mailing_DAO_BounceType',
97 'name' => 'description',
98 'type' => CRM_Utils_Type
::T_STRING
,
99 'title' => ts('Bounce Type Description'),
100 'description' => ts('A description of this bounce type'),
102 'size' => CRM_Utils_Type
::HUGE
,
103 'table_name' => 'civicrm_mailing_bounce_type',
104 'entity' => 'BounceType',
105 'bao' => 'CRM_Mailing_DAO_BounceType',
108 'hold_threshold' => [
109 'name' => 'hold_threshold',
110 'type' => CRM_Utils_Type
::T_INT
,
111 'title' => ts('Hold Threshold'),
112 'description' => ts('Number of bounces of this type required before the email address is put on bounce hold'),
114 'table_name' => 'civicrm_mailing_bounce_type',
115 'entity' => 'BounceType',
116 'bao' => 'CRM_Mailing_DAO_BounceType',
120 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
122 return Civi
::$statics[__CLASS__
]['fields'];
126 * Return a mapping from field-name to the corresponding key (as used in fields()).
129 * Array(string $name => string $uniqueName).
131 public static function &fieldKeys() {
132 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
133 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
135 return Civi
::$statics[__CLASS__
]['fieldKeys'];
139 * Returns the names of this table
143 public static function getTableName() {
144 return self
::$_tableName;
148 * Returns if this table needs to be logged
152 public function getLog() {
157 * Returns the list of fields that can be imported
159 * @param bool $prefix
163 public static function &import($prefix = FALSE) {
164 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
169 * Returns the list of fields that can be exported
171 * @param bool $prefix
175 public static function &export($prefix = FALSE) {
176 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
181 * Returns the list of indices
183 * @param bool $localize
187 public static function indices($localize = TRUE) {
189 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;