5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Mailing/Event/Confirm.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:fa4cd94c6068f7729b05ba10ab255b05)
13 * Database access object for the Confirm entity.
15 class CRM_Mailing_Event_DAO_Confirm
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_mailing_event_confirm';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
37 * FK to civicrm_mailing_event_subscribe
41 public $event_subscribe_id;
44 * When this confirmation event occurred.
53 public function __construct() {
54 $this->__table
= 'civicrm_mailing_event_confirm';
55 parent
::__construct();
59 * Returns foreign keys and entity references.
62 * [CRM_Core_Reference_Interface]
64 public static function getReferenceColumns() {
65 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
66 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
67 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'event_subscribe_id', 'civicrm_mailing_event_subscribe', 'id');
68 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
70 return Civi
::$statics[__CLASS__
]['links'];
74 * Returns all the column names of this table
78 public static function &fields() {
79 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
80 Civi
::$statics[__CLASS__
]['fields'] = [
83 'type' => CRM_Utils_Type
::T_INT
,
84 'title' => ts('Mailing Confirmation ID'),
86 'where' => 'civicrm_mailing_event_confirm.id',
87 'table_name' => 'civicrm_mailing_event_confirm',
88 'entity' => 'Confirm',
89 'bao' => 'CRM_Mailing_Event_BAO_Confirm',
92 'event_subscribe_id' => [
93 'name' => 'event_subscribe_id',
94 'type' => CRM_Utils_Type
::T_INT
,
95 'title' => ts('Mailing Subscribe ID'),
96 'description' => ts('FK to civicrm_mailing_event_subscribe'),
98 'where' => 'civicrm_mailing_event_confirm.event_subscribe_id',
99 'table_name' => 'civicrm_mailing_event_confirm',
100 'entity' => 'Confirm',
101 'bao' => 'CRM_Mailing_Event_BAO_Confirm',
103 'FKClassName' => 'CRM_Mailing_Event_DAO_Subscribe',
106 'name' => 'time_stamp',
107 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
108 'title' => ts('Confirm Timestamp'),
109 'description' => ts('When this confirmation event occurred.'),
111 'where' => 'civicrm_mailing_event_confirm.time_stamp',
112 'default' => 'CURRENT_TIMESTAMP',
113 'table_name' => 'civicrm_mailing_event_confirm',
114 'entity' => 'Confirm',
115 'bao' => 'CRM_Mailing_Event_BAO_Confirm',
119 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
121 return Civi
::$statics[__CLASS__
]['fields'];
125 * Return a mapping from field-name to the corresponding key (as used in fields()).
128 * Array(string $name => string $uniqueName).
130 public static function &fieldKeys() {
131 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
132 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
134 return Civi
::$statics[__CLASS__
]['fieldKeys'];
138 * Returns the names of this table
142 public static function getTableName() {
143 return self
::$_tableName;
147 * Returns if this table needs to be logged
151 public function getLog() {
156 * Returns the list of fields that can be imported
158 * @param bool $prefix
162 public static function &import($prefix = FALSE) {
163 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_event_confirm', $prefix, []);
168 * Returns the list of fields that can be exported
170 * @param bool $prefix
174 public static function &export($prefix = FALSE) {
175 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_event_confirm', $prefix, []);
180 * Returns the list of indices
182 * @param bool $localize
186 public static function indices($localize = TRUE) {
188 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;