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