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:cde25653865971ad7f5692dfd0eb7c39)
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
= '';
18 const COMPONENT
= 'CiviMail';
21 * Static instance to hold the table name.
25 public static $_tableName = 'civicrm_mailing_bounce_type';
28 * Should CiviCRM log any modifications to this table in the civicrm_log table.
32 public static $_log = FALSE;
47 * A description of this bounce type
54 * Number of bounces of this type required before the email address is put on bounce hold
58 public $hold_threshold;
63 public function __construct() {
64 $this->__table
= 'civicrm_mailing_bounce_type';
65 parent
::__construct();
69 * Returns localized title of this entity.
72 * Whether to return the plural version of the title.
74 public static function getEntityTitle($plural = FALSE) {
75 return $plural ?
ts('Bounce Types') : ts('Bounce Type');
79 * Returns all the column names of this table
83 public static function &fields() {
84 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
85 Civi
::$statics[__CLASS__
]['fields'] = [
88 'type' => CRM_Utils_Type
::T_INT
,
89 'title' => ts('Bounce Type ID'),
91 'where' => 'civicrm_mailing_bounce_type.id',
92 'table_name' => 'civicrm_mailing_bounce_type',
93 'entity' => 'BounceType',
94 'bao' => 'CRM_Mailing_DAO_BounceType',
104 'type' => CRM_Utils_Type
::T_STRING
,
105 'title' => ts('Bounce Type Name'),
106 'description' => ts('Type of bounce'),
109 'size' => CRM_Utils_Type
::MEDIUM
,
110 'where' => 'civicrm_mailing_bounce_type.name',
111 'table_name' => 'civicrm_mailing_bounce_type',
112 'entity' => 'BounceType',
113 'bao' => 'CRM_Mailing_DAO_BounceType',
118 'name' => 'description',
119 'type' => CRM_Utils_Type
::T_STRING
,
120 'title' => ts('Bounce Type Description'),
121 'description' => ts('A description of this bounce type'),
123 'size' => CRM_Utils_Type
::HUGE
,
124 'where' => 'civicrm_mailing_bounce_type.description',
125 'table_name' => 'civicrm_mailing_bounce_type',
126 'entity' => 'BounceType',
127 'bao' => 'CRM_Mailing_DAO_BounceType',
131 'hold_threshold' => [
132 'name' => 'hold_threshold',
133 'type' => CRM_Utils_Type
::T_INT
,
134 'title' => ts('Hold Threshold'),
135 'description' => ts('Number of bounces of this type required before the email address is put on bounce hold'),
137 'where' => 'civicrm_mailing_bounce_type.hold_threshold',
138 'table_name' => 'civicrm_mailing_bounce_type',
139 'entity' => 'BounceType',
140 'bao' => 'CRM_Mailing_DAO_BounceType',
145 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
147 return Civi
::$statics[__CLASS__
]['fields'];
151 * Return a mapping from field-name to the corresponding key (as used in fields()).
154 * Array(string $name => string $uniqueName).
156 public static function &fieldKeys() {
157 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
158 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
160 return Civi
::$statics[__CLASS__
]['fieldKeys'];
164 * Returns the names of this table
168 public static function getTableName() {
169 return self
::$_tableName;
173 * Returns if this table needs to be logged
177 public function getLog() {
182 * Returns the list of fields that can be imported
184 * @param bool $prefix
188 public static function &import($prefix = FALSE) {
189 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
194 * Returns the list of fields that can be exported
196 * @param bool $prefix
200 public static function &export($prefix = FALSE) {
201 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
206 * Returns the list of indices
208 * @param bool $localize
212 public static function indices($localize = TRUE) {
214 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;