Add titles and icons to entities
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
... / ...
CommitLineData
1<?php
2
3/**
4 * @package CRM
5 * @copyright CiviCRM LLC https://civicrm.org/licensing
6 *
7 * Generated from xml/schema/CRM/Core/ActionMapping.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:369620c3d8cd0ff237b5372cff2e041f)
10 */
11
12/**
13 * Database access object for the ActionMapping entity.
14 */
15class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
16
17 /**
18 * Static instance to hold the table name.
19 *
20 * @var string
21 */
22 public 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 public static $_log = FALSE;
30
31 /**
32 * @var int
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 localized title of this entity.
102 */
103 public static function getEntityTitle() {
104 return ts('Action Mappings');
105 }
106
107 /**
108 * Returns all the column names of this table
109 *
110 * @return array
111 */
112 public static function &fields() {
113 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
114 Civi::$statics[__CLASS__]['fields'] = [
115 'id' => [
116 'name' => 'id',
117 'type' => CRM_Utils_Type::T_INT,
118 'title' => ts('Action Mapping ID'),
119 'required' => TRUE,
120 'where' => 'civicrm_action_mapping.id',
121 'table_name' => 'civicrm_action_mapping',
122 'entity' => 'ActionMapping',
123 'bao' => 'CRM_Core_DAO_ActionMapping',
124 'localizable' => 0,
125 ],
126 'entity' => [
127 'name' => 'entity',
128 'type' => CRM_Utils_Type::T_STRING,
129 'title' => ts('Action Mapping Entity'),
130 'description' => ts('Entity for which the reminder is created'),
131 'maxlength' => 64,
132 'size' => CRM_Utils_Type::BIG,
133 'where' => 'civicrm_action_mapping.entity',
134 'table_name' => 'civicrm_action_mapping',
135 'entity' => 'ActionMapping',
136 'bao' => 'CRM_Core_DAO_ActionMapping',
137 'localizable' => 0,
138 ],
139 'entity_value' => [
140 'name' => 'entity_value',
141 'type' => CRM_Utils_Type::T_STRING,
142 'title' => ts('Action Mapping Entity Value'),
143 'description' => ts('Entity value'),
144 'maxlength' => 64,
145 'size' => CRM_Utils_Type::BIG,
146 'where' => 'civicrm_action_mapping.entity_value',
147 'table_name' => 'civicrm_action_mapping',
148 'entity' => 'ActionMapping',
149 'bao' => 'CRM_Core_DAO_ActionMapping',
150 'localizable' => 0,
151 ],
152 'entity_value_label' => [
153 'name' => 'entity_value_label',
154 'type' => CRM_Utils_Type::T_STRING,
155 'title' => ts('Value Label'),
156 'description' => ts('Entity value label'),
157 'maxlength' => 64,
158 'size' => CRM_Utils_Type::BIG,
159 'where' => 'civicrm_action_mapping.entity_value_label',
160 'table_name' => 'civicrm_action_mapping',
161 'entity' => 'ActionMapping',
162 'bao' => 'CRM_Core_DAO_ActionMapping',
163 'localizable' => 0,
164 ],
165 'entity_status' => [
166 'name' => 'entity_status',
167 'type' => CRM_Utils_Type::T_STRING,
168 'title' => ts('Status'),
169 'description' => ts('Entity status'),
170 'maxlength' => 64,
171 'size' => CRM_Utils_Type::BIG,
172 'where' => 'civicrm_action_mapping.entity_status',
173 'table_name' => 'civicrm_action_mapping',
174 'entity' => 'ActionMapping',
175 'bao' => 'CRM_Core_DAO_ActionMapping',
176 'localizable' => 0,
177 ],
178 'entity_status_label' => [
179 'name' => 'entity_status_label',
180 'type' => CRM_Utils_Type::T_STRING,
181 'title' => ts('Status Label'),
182 'description' => ts('Entity status label'),
183 'maxlength' => 64,
184 'size' => CRM_Utils_Type::BIG,
185 'where' => 'civicrm_action_mapping.entity_status_label',
186 'table_name' => 'civicrm_action_mapping',
187 'entity' => 'ActionMapping',
188 'bao' => 'CRM_Core_DAO_ActionMapping',
189 'localizable' => 0,
190 ],
191 'entity_date_start' => [
192 'name' => 'entity_date_start',
193 'type' => CRM_Utils_Type::T_STRING,
194 'title' => ts('Entity Start Date'),
195 'description' => ts('Entity date'),
196 'maxlength' => 64,
197 'size' => CRM_Utils_Type::BIG,
198 'where' => 'civicrm_action_mapping.entity_date_start',
199 'table_name' => 'civicrm_action_mapping',
200 'entity' => 'ActionMapping',
201 'bao' => 'CRM_Core_DAO_ActionMapping',
202 'localizable' => 0,
203 ],
204 'entity_date_end' => [
205 'name' => 'entity_date_end',
206 'type' => CRM_Utils_Type::T_STRING,
207 'title' => ts('Entity End Date'),
208 'description' => ts('Entity date'),
209 'maxlength' => 64,
210 'size' => CRM_Utils_Type::BIG,
211 'where' => 'civicrm_action_mapping.entity_date_end',
212 'table_name' => 'civicrm_action_mapping',
213 'entity' => 'ActionMapping',
214 'bao' => 'CRM_Core_DAO_ActionMapping',
215 'localizable' => 0,
216 ],
217 'entity_recipient' => [
218 'name' => 'entity_recipient',
219 'type' => CRM_Utils_Type::T_STRING,
220 'title' => ts('Entity Recipient'),
221 'description' => ts('Entity recipient'),
222 'maxlength' => 64,
223 'size' => CRM_Utils_Type::BIG,
224 'where' => 'civicrm_action_mapping.entity_recipient',
225 'table_name' => 'civicrm_action_mapping',
226 'entity' => 'ActionMapping',
227 'bao' => 'CRM_Core_DAO_ActionMapping',
228 'localizable' => 0,
229 ],
230 ];
231 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
232 }
233 return Civi::$statics[__CLASS__]['fields'];
234 }
235
236 /**
237 * Return a mapping from field-name to the corresponding key (as used in fields()).
238 *
239 * @return array
240 * Array(string $name => string $uniqueName).
241 */
242 public static function &fieldKeys() {
243 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
244 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
245 }
246 return Civi::$statics[__CLASS__]['fieldKeys'];
247 }
248
249 /**
250 * Returns the names of this table
251 *
252 * @return string
253 */
254 public static function getTableName() {
255 return self::$_tableName;
256 }
257
258 /**
259 * Returns if this table needs to be logged
260 *
261 * @return bool
262 */
263 public function getLog() {
264 return self::$_log;
265 }
266
267 /**
268 * Returns the list of fields that can be imported
269 *
270 * @param bool $prefix
271 *
272 * @return array
273 */
274 public static function &import($prefix = FALSE) {
275 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, []);
276 return $r;
277 }
278
279 /**
280 * Returns the list of fields that can be exported
281 *
282 * @param bool $prefix
283 *
284 * @return array
285 */
286 public static function &export($prefix = FALSE) {
287 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, []);
288 return $r;
289 }
290
291 /**
292 * Returns the list of indices
293 *
294 * @param bool $localize
295 *
296 * @return array
297 */
298 public static function indices($localize = TRUE) {
299 $indices = [];
300 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
301 }
302
303}