Merge pull request #12669 from eileenmcnaughton/dedupe_zero
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
1 <?php
2
3 /**
4 * @package CRM
5 * @copyright CiviCRM LLC (c) 2004-2019
6 *
7 * Generated from xml/schema/CRM/Core/ActionMapping.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:eafaaa48176b2854e6b8a7f19fc1ebe6)
10 */
11
12 /**
13 * Database access object for the ActionMapping entity.
14 */
15 class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
16
17 /**
18 * Static instance to hold the table name.
19 *
20 * @var string
21 */
22 static $_tableName = 'civicrm_action_mapping';
23
24 /**
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
26 *
27 * @var bool
28 */
29 static $_log = FALSE;
30
31 /**
32 * @var int unsigned
33 */
34 public $id;
35
36 /**
37 * Entity for which the reminder is created
38 *
39 * @var string
40 */
41 public $entity;
42
43 /**
44 * Entity value
45 *
46 * @var string
47 */
48 public $entity_value;
49
50 /**
51 * Entity value label
52 *
53 * @var string
54 */
55 public $entity_value_label;
56
57 /**
58 * Entity status
59 *
60 * @var string
61 */
62 public $entity_status;
63
64 /**
65 * Entity status label
66 *
67 * @var string
68 */
69 public $entity_status_label;
70
71 /**
72 * Entity date
73 *
74 * @var string
75 */
76 public $entity_date_start;
77
78 /**
79 * Entity date
80 *
81 * @var string
82 */
83 public $entity_date_end;
84
85 /**
86 * Entity recipient
87 *
88 * @var string
89 */
90 public $entity_recipient;
91
92 /**
93 * Class constructor.
94 */
95 public function __construct() {
96 $this->__table = 'civicrm_action_mapping';
97 parent::__construct();
98 }
99
100 /**
101 * Returns all the column names of this table
102 *
103 * @return array
104 */
105 public static function &fields() {
106 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
107 Civi::$statics[__CLASS__]['fields'] = [
108 'id' => [
109 'name' => 'id',
110 'type' => CRM_Utils_Type::T_INT,
111 'title' => ts('Action Mapping ID'),
112 'required' => TRUE,
113 'table_name' => 'civicrm_action_mapping',
114 'entity' => 'ActionMapping',
115 'bao' => 'CRM_Core_DAO_ActionMapping',
116 'localizable' => 0,
117 ],
118 'entity' => [
119 'name' => 'entity',
120 'type' => CRM_Utils_Type::T_STRING,
121 'title' => ts('Action Mapping Entity'),
122 'description' => ts('Entity for which the reminder is created'),
123 'maxlength' => 64,
124 'size' => CRM_Utils_Type::BIG,
125 'table_name' => 'civicrm_action_mapping',
126 'entity' => 'ActionMapping',
127 'bao' => 'CRM_Core_DAO_ActionMapping',
128 'localizable' => 0,
129 ],
130 'entity_value' => [
131 'name' => 'entity_value',
132 'type' => CRM_Utils_Type::T_STRING,
133 'title' => ts('Action Mapping Entity Value'),
134 'description' => ts('Entity value'),
135 'maxlength' => 64,
136 'size' => CRM_Utils_Type::BIG,
137 'table_name' => 'civicrm_action_mapping',
138 'entity' => 'ActionMapping',
139 'bao' => 'CRM_Core_DAO_ActionMapping',
140 'localizable' => 0,
141 ],
142 'entity_value_label' => [
143 'name' => 'entity_value_label',
144 'type' => CRM_Utils_Type::T_STRING,
145 'title' => ts('Value Label'),
146 'description' => ts('Entity value label'),
147 'maxlength' => 64,
148 'size' => CRM_Utils_Type::BIG,
149 'table_name' => 'civicrm_action_mapping',
150 'entity' => 'ActionMapping',
151 'bao' => 'CRM_Core_DAO_ActionMapping',
152 'localizable' => 0,
153 ],
154 'entity_status' => [
155 'name' => 'entity_status',
156 'type' => CRM_Utils_Type::T_STRING,
157 'title' => ts('Status'),
158 'description' => ts('Entity status'),
159 'maxlength' => 64,
160 'size' => CRM_Utils_Type::BIG,
161 'table_name' => 'civicrm_action_mapping',
162 'entity' => 'ActionMapping',
163 'bao' => 'CRM_Core_DAO_ActionMapping',
164 'localizable' => 0,
165 ],
166 'entity_status_label' => [
167 'name' => 'entity_status_label',
168 'type' => CRM_Utils_Type::T_STRING,
169 'title' => ts('Status Label'),
170 'description' => ts('Entity status label'),
171 'maxlength' => 64,
172 'size' => CRM_Utils_Type::BIG,
173 'table_name' => 'civicrm_action_mapping',
174 'entity' => 'ActionMapping',
175 'bao' => 'CRM_Core_DAO_ActionMapping',
176 'localizable' => 0,
177 ],
178 'entity_date_start' => [
179 'name' => 'entity_date_start',
180 'type' => CRM_Utils_Type::T_STRING,
181 'title' => ts('Entity Start Date'),
182 'description' => ts('Entity date'),
183 'maxlength' => 64,
184 'size' => CRM_Utils_Type::BIG,
185 'table_name' => 'civicrm_action_mapping',
186 'entity' => 'ActionMapping',
187 'bao' => 'CRM_Core_DAO_ActionMapping',
188 'localizable' => 0,
189 ],
190 'entity_date_end' => [
191 'name' => 'entity_date_end',
192 'type' => CRM_Utils_Type::T_STRING,
193 'title' => ts('Entity End Date'),
194 'description' => ts('Entity date'),
195 'maxlength' => 64,
196 'size' => CRM_Utils_Type::BIG,
197 'table_name' => 'civicrm_action_mapping',
198 'entity' => 'ActionMapping',
199 'bao' => 'CRM_Core_DAO_ActionMapping',
200 'localizable' => 0,
201 ],
202 'entity_recipient' => [
203 'name' => 'entity_recipient',
204 'type' => CRM_Utils_Type::T_STRING,
205 'title' => ts('Entity Recipient'),
206 'description' => ts('Entity recipient'),
207 'maxlength' => 64,
208 'size' => CRM_Utils_Type::BIG,
209 'table_name' => 'civicrm_action_mapping',
210 'entity' => 'ActionMapping',
211 'bao' => 'CRM_Core_DAO_ActionMapping',
212 'localizable' => 0,
213 ],
214 ];
215 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
216 }
217 return Civi::$statics[__CLASS__]['fields'];
218 }
219
220 /**
221 * Return a mapping from field-name to the corresponding key (as used in fields()).
222 *
223 * @return array
224 * Array(string $name => string $uniqueName).
225 */
226 public static function &fieldKeys() {
227 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
228 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
229 }
230 return Civi::$statics[__CLASS__]['fieldKeys'];
231 }
232
233 /**
234 * Returns the names of this table
235 *
236 * @return string
237 */
238 public static function getTableName() {
239 return self::$_tableName;
240 }
241
242 /**
243 * Returns if this table needs to be logged
244 *
245 * @return bool
246 */
247 public function getLog() {
248 return self::$_log;
249 }
250
251 /**
252 * Returns the list of fields that can be imported
253 *
254 * @param bool $prefix
255 *
256 * @return array
257 */
258 public static function &import($prefix = FALSE) {
259 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, []);
260 return $r;
261 }
262
263 /**
264 * Returns the list of fields that can be exported
265 *
266 * @param bool $prefix
267 *
268 * @return array
269 */
270 public static function &export($prefix = FALSE) {
271 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, []);
272 return $r;
273 }
274
275 /**
276 * Returns the list of indices
277 *
278 * @param bool $localize
279 *
280 * @return array
281 */
282 public static function indices($localize = TRUE) {
283 $indices = [];
284 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
285 }
286
287 }