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:d85cecf66659cee08c967e8671ba7b6d)
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',
100 'type' => CRM_Utils_Type
::T_STRING
,
101 'title' => ts('Bounce Type Name'),
102 'description' => ts('Type of bounce'),
105 'size' => CRM_Utils_Type
::MEDIUM
,
106 'where' => 'civicrm_mailing_bounce_type.name',
107 'table_name' => 'civicrm_mailing_bounce_type',
108 'entity' => 'BounceType',
109 'bao' => 'CRM_Mailing_DAO_BounceType',
114 'name' => 'description',
115 'type' => CRM_Utils_Type
::T_STRING
,
116 'title' => ts('Bounce Type Description'),
117 'description' => ts('A description of this bounce type'),
119 'size' => CRM_Utils_Type
::HUGE
,
120 'where' => 'civicrm_mailing_bounce_type.description',
121 'table_name' => 'civicrm_mailing_bounce_type',
122 'entity' => 'BounceType',
123 'bao' => 'CRM_Mailing_DAO_BounceType',
127 'hold_threshold' => [
128 'name' => 'hold_threshold',
129 'type' => CRM_Utils_Type
::T_INT
,
130 'title' => ts('Hold Threshold'),
131 'description' => ts('Number of bounces of this type required before the email address is put on bounce hold'),
133 'where' => 'civicrm_mailing_bounce_type.hold_threshold',
134 'table_name' => 'civicrm_mailing_bounce_type',
135 'entity' => 'BounceType',
136 'bao' => 'CRM_Mailing_DAO_BounceType',
141 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
143 return Civi
::$statics[__CLASS__
]['fields'];
147 * Return a mapping from field-name to the corresponding key (as used in fields()).
150 * Array(string $name => string $uniqueName).
152 public static function &fieldKeys() {
153 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
154 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
156 return Civi
::$statics[__CLASS__
]['fieldKeys'];
160 * Returns the names of this table
164 public static function getTableName() {
165 return self
::$_tableName;
169 * Returns if this table needs to be logged
173 public function getLog() {
178 * Returns the list of fields that can be imported
180 * @param bool $prefix
184 public static function &import($prefix = FALSE) {
185 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
190 * Returns the list of fields that can be exported
192 * @param bool $prefix
196 public static function &export($prefix = FALSE) {
197 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_bounce_type', $prefix, []);
202 * Returns the list of indices
204 * @param bool $localize
208 public static function indices($localize = TRUE) {
210 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;