Commit | Line | Data |
---|---|---|
e501603b | 1 | <?php |
c3fc2621 | 2 | |
e501603b TO |
3 | /** |
4 | * @package CRM | |
ca5cec67 | 5 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
e501603b TO |
6 | * |
7 | * Generated from xml/schema/CRM/Contribute/Widget.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
c1e814c7 | 9 | * (GenCodeChecksum:8327209557468328fd4ec358866fdab0) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the Widget entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Contribute_DAO_Widget extends CRM_Core_DAO { |
929a1c14 CW |
16 | const EXT = 'civicrm'; |
17 | const TABLE_ADDED = '2.0'; | |
d31fb4e3 | 18 | const COMPONENT = 'CiviContribute'; |
c3fc2621 | 19 | |
e501603b | 20 | /** |
f41f0342 | 21 | * Static instance to hold the table name. |
e501603b TO |
22 | * |
23 | * @var string | |
24 | */ | |
fa45b5b9 | 25 | public static $_tableName = 'civicrm_contribution_widget'; |
c3fc2621 | 26 | |
e501603b | 27 | /** |
f41f0342 | 28 | * Should CiviCRM log any modifications to this table in the civicrm_log table. |
e501603b | 29 | * |
c3fc2621 | 30 | * @var bool |
e501603b | 31 | */ |
fa45b5b9 | 32 | public static $_log = TRUE; |
c3fc2621 | 33 | |
e501603b | 34 | /** |
2cbbebe8 | 35 | * Contribution ID |
e501603b | 36 | * |
28979d65 CW |
37 | * @var int|string|null |
38 | * (SQL type: int unsigned) | |
39 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
40 | */ |
41 | public $id; | |
c3fc2621 | 42 | |
e501603b TO |
43 | /** |
44 | * The Contribution Page which triggered this contribution | |
45 | * | |
28979d65 CW |
46 | * @var int|string|null |
47 | * (SQL type: int unsigned) | |
48 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
49 | */ |
50 | public $contribution_page_id; | |
c3fc2621 | 51 | |
e501603b TO |
52 | /** |
53 | * Is this property active? | |
54 | * | |
c1e814c7 | 55 | * @var bool|string |
28979d65 CW |
56 | * (SQL type: tinyint) |
57 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
58 | */ |
59 | public $is_active; | |
c3fc2621 | 60 | |
e501603b TO |
61 | /** |
62 | * Widget title. | |
63 | * | |
28979d65 CW |
64 | * @var string|null |
65 | * (SQL type: varchar(255)) | |
66 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
67 | */ |
68 | public $title; | |
c3fc2621 | 69 | |
e501603b TO |
70 | /** |
71 | * URL to Widget logo | |
72 | * | |
28979d65 CW |
73 | * @var string|null |
74 | * (SQL type: varchar(255)) | |
75 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
76 | */ |
77 | public $url_logo; | |
c3fc2621 | 78 | |
e501603b TO |
79 | /** |
80 | * Button title. | |
81 | * | |
28979d65 CW |
82 | * @var string|null |
83 | * (SQL type: varchar(255)) | |
84 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
85 | */ |
86 | public $button_title; | |
c3fc2621 | 87 | |
e501603b TO |
88 | /** |
89 | * About description. | |
90 | * | |
28979d65 CW |
91 | * @var string|null |
92 | * (SQL type: text) | |
93 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
94 | */ |
95 | public $about; | |
c3fc2621 | 96 | |
e501603b TO |
97 | /** |
98 | * URL to Homepage. | |
99 | * | |
28979d65 CW |
100 | * @var string|null |
101 | * (SQL type: varchar(255)) | |
102 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
103 | */ |
104 | public $url_homepage; | |
c3fc2621 | 105 | |
e501603b | 106 | /** |
28979d65 CW |
107 | * @var string|null |
108 | * (SQL type: varchar(10)) | |
109 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
110 | */ |
111 | public $color_title; | |
c3fc2621 | 112 | |
e501603b | 113 | /** |
28979d65 CW |
114 | * @var string|null |
115 | * (SQL type: varchar(10)) | |
116 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
117 | */ |
118 | public $color_button; | |
c3fc2621 | 119 | |
e501603b | 120 | /** |
28979d65 CW |
121 | * @var string|null |
122 | * (SQL type: varchar(10)) | |
123 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
124 | */ |
125 | public $color_bar; | |
c3fc2621 | 126 | |
e501603b | 127 | /** |
28979d65 CW |
128 | * @var string|null |
129 | * (SQL type: varchar(10)) | |
130 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
131 | */ |
132 | public $color_main_text; | |
c3fc2621 | 133 | |
e501603b | 134 | /** |
28979d65 CW |
135 | * @var string|null |
136 | * (SQL type: varchar(10)) | |
137 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
138 | */ |
139 | public $color_main; | |
c3fc2621 | 140 | |
e501603b | 141 | /** |
28979d65 CW |
142 | * @var string|null |
143 | * (SQL type: varchar(10)) | |
144 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
145 | */ |
146 | public $color_main_bg; | |
c3fc2621 | 147 | |
e501603b | 148 | /** |
28979d65 CW |
149 | * @var string|null |
150 | * (SQL type: varchar(10)) | |
151 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
152 | */ |
153 | public $color_bg; | |
c3fc2621 | 154 | |
e501603b | 155 | /** |
28979d65 CW |
156 | * @var string|null |
157 | * (SQL type: varchar(10)) | |
158 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
159 | */ |
160 | public $color_about_link; | |
c3fc2621 | 161 | |
e501603b | 162 | /** |
28979d65 CW |
163 | * @var string|null |
164 | * (SQL type: varchar(10)) | |
165 | * Note that values will be retrieved from the database as a string. | |
e501603b TO |
166 | */ |
167 | public $color_homepage_link; | |
c3fc2621 | 168 | |
e501603b | 169 | /** |
f41f0342 | 170 | * Class constructor. |
e501603b | 171 | */ |
c3fc2621 | 172 | public function __construct() { |
e501603b TO |
173 | $this->__table = 'civicrm_contribution_widget'; |
174 | parent::__construct(); | |
175 | } | |
c3fc2621 | 176 | |
449c4e6b CW |
177 | /** |
178 | * Returns localized title of this entity. | |
7b66c3b5 AH |
179 | * |
180 | * @param bool $plural | |
181 | * Whether to return the plural version of the title. | |
449c4e6b | 182 | */ |
7b66c3b5 AH |
183 | public static function getEntityTitle($plural = FALSE) { |
184 | return $plural ? ts('Widgets') : ts('Widget'); | |
449c4e6b CW |
185 | } |
186 | ||
e501603b | 187 | /** |
f41f0342 | 188 | * Returns foreign keys and entity references. |
e501603b TO |
189 | * |
190 | * @return array | |
191 | * [CRM_Core_Reference_Interface] | |
192 | */ | |
c3fc2621 | 193 | public static function getReferenceColumns() { |
346aaaba | 194 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
fa45b5b9 | 195 | Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); |
c3fc2621 | 196 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'contribution_page_id', 'civicrm_contribution_page', 'id'); |
346aaaba | 197 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); |
e501603b | 198 | } |
346aaaba | 199 | return Civi::$statics[__CLASS__]['links']; |
e501603b | 200 | } |
c3fc2621 | 201 | |
e501603b TO |
202 | /** |
203 | * Returns all the column names of this table | |
204 | * | |
205 | * @return array | |
206 | */ | |
c3fc2621 | 207 | public static function &fields() { |
346aaaba | 208 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
209 | Civi::$statics[__CLASS__]['fields'] = [ |
210 | 'id' => [ | |
e501603b TO |
211 | 'name' => 'id', |
212 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 213 | 'title' => ts('Widget ID'), |
2cbbebe8 | 214 | 'description' => ts('Contribution ID'), |
c3fc2621 | 215 | 'required' => TRUE, |
a36434b9 | 216 | 'where' => 'civicrm_contribution_widget.id', |
522a26c9 | 217 | 'table_name' => 'civicrm_contribution_widget', |
218 | 'entity' => 'Widget', | |
219 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 220 | 'localizable' => 0, |
2cbbebe8 A |
221 | 'html' => [ |
222 | 'type' => 'Number', | |
223 | ], | |
1fe423d6 | 224 | 'readonly' => TRUE, |
a9d0587b | 225 | 'add' => '2.0', |
c3fc2621 CW |
226 | ], |
227 | 'contribution_page_id' => [ | |
e501603b TO |
228 | 'name' => 'contribution_page_id', |
229 | 'type' => CRM_Utils_Type::T_INT, | |
2cbbebe8 | 230 | 'title' => ts('Contribution Page ID'), |
215b423e | 231 | 'description' => ts('The Contribution Page which triggered this contribution'), |
a36434b9 | 232 | 'where' => 'civicrm_contribution_widget.contribution_page_id', |
522a26c9 | 233 | 'table_name' => 'civicrm_contribution_widget', |
234 | 'entity' => 'Widget', | |
235 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 236 | 'localizable' => 0, |
e501603b | 237 | 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage', |
2cbbebe8 A |
238 | 'html' => [ |
239 | 'label' => ts("Contribution Page"), | |
240 | ], | |
a9d0587b | 241 | 'add' => '1.5', |
c3fc2621 CW |
242 | ], |
243 | 'is_active' => [ | |
e501603b TO |
244 | 'name' => 'is_active', |
245 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 246 | 'title' => ts('Enabled?'), |
215b423e | 247 | 'description' => ts('Is this property active?'), |
c1e814c7 | 248 | 'required' => TRUE, |
a36434b9 | 249 | 'where' => 'civicrm_contribution_widget.is_active', |
c1e814c7 | 250 | 'default' => '1', |
522a26c9 | 251 | 'table_name' => 'civicrm_contribution_widget', |
252 | 'entity' => 'Widget', | |
253 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 254 | 'localizable' => 0, |
a9d0587b | 255 | 'add' => '2.0', |
c3fc2621 CW |
256 | ], |
257 | 'title' => [ | |
e501603b TO |
258 | 'name' => 'title', |
259 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 260 | 'title' => ts('Widget Title'), |
215b423e | 261 | 'description' => ts('Widget title.'), |
e501603b TO |
262 | 'maxlength' => 255, |
263 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 264 | 'where' => 'civicrm_contribution_widget.title', |
522a26c9 | 265 | 'table_name' => 'civicrm_contribution_widget', |
266 | 'entity' => 'Widget', | |
267 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 268 | 'localizable' => 0, |
a9d0587b | 269 | 'add' => '2.0', |
c3fc2621 CW |
270 | ], |
271 | 'url_logo' => [ | |
e501603b TO |
272 | 'name' => 'url_logo', |
273 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 274 | 'title' => ts('Widget Image Url'), |
215b423e | 275 | 'description' => ts('URL to Widget logo'), |
e501603b TO |
276 | 'maxlength' => 255, |
277 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 278 | 'where' => 'civicrm_contribution_widget.url_logo', |
522a26c9 | 279 | 'table_name' => 'civicrm_contribution_widget', |
280 | 'entity' => 'Widget', | |
281 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 282 | 'localizable' => 0, |
a9d0587b | 283 | 'add' => '2.0', |
c3fc2621 CW |
284 | ], |
285 | 'button_title' => [ | |
e501603b TO |
286 | 'name' => 'button_title', |
287 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 288 | 'title' => ts('Button Title'), |
215b423e | 289 | 'description' => ts('Button title.'), |
e501603b TO |
290 | 'maxlength' => 255, |
291 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 292 | 'where' => 'civicrm_contribution_widget.button_title', |
522a26c9 | 293 | 'table_name' => 'civicrm_contribution_widget', |
294 | 'entity' => 'Widget', | |
295 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 296 | 'localizable' => 0, |
a9d0587b | 297 | 'add' => '2.0', |
c3fc2621 CW |
298 | ], |
299 | 'about' => [ | |
e501603b TO |
300 | 'name' => 'about', |
301 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 302 | 'title' => ts('Description'), |
215b423e | 303 | 'description' => ts('About description.'), |
a36434b9 | 304 | 'where' => 'civicrm_contribution_widget.about', |
522a26c9 | 305 | 'table_name' => 'civicrm_contribution_widget', |
306 | 'entity' => 'Widget', | |
307 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 308 | 'localizable' => 0, |
a9d0587b | 309 | 'add' => '2.0', |
c3fc2621 CW |
310 | ], |
311 | 'url_homepage' => [ | |
e501603b TO |
312 | 'name' => 'url_homepage', |
313 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 314 | 'title' => ts('Homepage Url'), |
215b423e | 315 | 'description' => ts('URL to Homepage.'), |
e501603b TO |
316 | 'maxlength' => 255, |
317 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 318 | 'where' => 'civicrm_contribution_widget.url_homepage', |
522a26c9 | 319 | 'table_name' => 'civicrm_contribution_widget', |
320 | 'entity' => 'Widget', | |
321 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 322 | 'localizable' => 0, |
a9d0587b | 323 | 'add' => '2.0', |
c3fc2621 CW |
324 | ], |
325 | 'color_title' => [ | |
e501603b TO |
326 | 'name' => 'color_title', |
327 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 328 | 'title' => ts('Title Color'), |
e501603b TO |
329 | 'maxlength' => 10, |
330 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 331 | 'where' => 'civicrm_contribution_widget.color_title', |
522a26c9 | 332 | 'table_name' => 'civicrm_contribution_widget', |
333 | 'entity' => 'Widget', | |
334 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 335 | 'localizable' => 0, |
a9d0587b | 336 | 'add' => '2.0', |
c3fc2621 CW |
337 | ], |
338 | 'color_button' => [ | |
e501603b TO |
339 | 'name' => 'color_button', |
340 | 'type' => CRM_Utils_Type::T_STRING, | |
d63dedfa | 341 | 'title' => ts('Button Color'), |
e501603b TO |
342 | 'maxlength' => 10, |
343 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 344 | 'where' => 'civicrm_contribution_widget.color_button', |
522a26c9 | 345 | 'table_name' => 'civicrm_contribution_widget', |
346 | 'entity' => 'Widget', | |
347 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 348 | 'localizable' => 0, |
a9d0587b | 349 | 'add' => '2.0', |
c3fc2621 CW |
350 | ], |
351 | 'color_bar' => [ | |
e501603b TO |
352 | 'name' => 'color_bar', |
353 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 354 | 'title' => ts('Bar Color'), |
e501603b TO |
355 | 'maxlength' => 10, |
356 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 357 | 'where' => 'civicrm_contribution_widget.color_bar', |
522a26c9 | 358 | 'table_name' => 'civicrm_contribution_widget', |
359 | 'entity' => 'Widget', | |
360 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 361 | 'localizable' => 0, |
a9d0587b | 362 | 'add' => '2.0', |
c3fc2621 CW |
363 | ], |
364 | 'color_main_text' => [ | |
e501603b TO |
365 | 'name' => 'color_main_text', |
366 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 367 | 'title' => ts('Main Text Color'), |
e501603b TO |
368 | 'maxlength' => 10, |
369 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 370 | 'where' => 'civicrm_contribution_widget.color_main_text', |
522a26c9 | 371 | 'table_name' => 'civicrm_contribution_widget', |
372 | 'entity' => 'Widget', | |
373 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 374 | 'localizable' => 0, |
a9d0587b | 375 | 'add' => '2.0', |
c3fc2621 CW |
376 | ], |
377 | 'color_main' => [ | |
e501603b TO |
378 | 'name' => 'color_main', |
379 | 'type' => CRM_Utils_Type::T_STRING, | |
d63dedfa | 380 | 'title' => ts('Main Color'), |
e501603b TO |
381 | 'maxlength' => 10, |
382 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 383 | 'where' => 'civicrm_contribution_widget.color_main', |
522a26c9 | 384 | 'table_name' => 'civicrm_contribution_widget', |
385 | 'entity' => 'Widget', | |
386 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 387 | 'localizable' => 0, |
a9d0587b | 388 | 'add' => '2.0', |
c3fc2621 CW |
389 | ], |
390 | 'color_main_bg' => [ | |
e501603b TO |
391 | 'name' => 'color_main_bg', |
392 | 'type' => CRM_Utils_Type::T_STRING, | |
d63dedfa | 393 | 'title' => ts('Background Color'), |
e501603b TO |
394 | 'maxlength' => 10, |
395 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 396 | 'where' => 'civicrm_contribution_widget.color_main_bg', |
522a26c9 | 397 | 'table_name' => 'civicrm_contribution_widget', |
398 | 'entity' => 'Widget', | |
399 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 400 | 'localizable' => 0, |
a9d0587b | 401 | 'add' => '2.0', |
c3fc2621 CW |
402 | ], |
403 | 'color_bg' => [ | |
e501603b TO |
404 | 'name' => 'color_bg', |
405 | 'type' => CRM_Utils_Type::T_STRING, | |
d63dedfa | 406 | 'title' => ts('Other Background Color'), |
e501603b TO |
407 | 'maxlength' => 10, |
408 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 409 | 'where' => 'civicrm_contribution_widget.color_bg', |
522a26c9 | 410 | 'table_name' => 'civicrm_contribution_widget', |
411 | 'entity' => 'Widget', | |
412 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 413 | 'localizable' => 0, |
a9d0587b | 414 | 'add' => '2.0', |
c3fc2621 CW |
415 | ], |
416 | 'color_about_link' => [ | |
e501603b TO |
417 | 'name' => 'color_about_link', |
418 | 'type' => CRM_Utils_Type::T_STRING, | |
d63dedfa | 419 | 'title' => ts('About Link Color'), |
e501603b TO |
420 | 'maxlength' => 10, |
421 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 422 | 'where' => 'civicrm_contribution_widget.color_about_link', |
522a26c9 | 423 | 'table_name' => 'civicrm_contribution_widget', |
424 | 'entity' => 'Widget', | |
425 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 426 | 'localizable' => 0, |
a9d0587b | 427 | 'add' => '2.0', |
c3fc2621 CW |
428 | ], |
429 | 'color_homepage_link' => [ | |
e501603b TO |
430 | 'name' => 'color_homepage_link', |
431 | 'type' => CRM_Utils_Type::T_STRING, | |
d63dedfa | 432 | 'title' => ts('Homepage Link Color'), |
e501603b TO |
433 | 'maxlength' => 10, |
434 | 'size' => CRM_Utils_Type::TWELVE, | |
a36434b9 | 435 | 'where' => 'civicrm_contribution_widget.color_homepage_link', |
522a26c9 | 436 | 'table_name' => 'civicrm_contribution_widget', |
437 | 'entity' => 'Widget', | |
438 | 'bao' => 'CRM_Contribute_BAO_Widget', | |
6a7e5e5d | 439 | 'localizable' => 0, |
a9d0587b | 440 | 'add' => '2.0', |
c3fc2621 CW |
441 | ], |
442 | ]; | |
346aaaba | 443 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 444 | } |
346aaaba | 445 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 446 | } |
c3fc2621 | 447 | |
e501603b | 448 | /** |
bd8e0b14 | 449 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
450 | * |
451 | * @return array | |
bd8e0b14 | 452 | * Array(string $name => string $uniqueName). |
e501603b | 453 | */ |
c3fc2621 | 454 | public static function &fieldKeys() { |
bd8e0b14 TO |
455 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
456 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 457 | } |
bd8e0b14 | 458 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 459 | } |
c3fc2621 | 460 | |
e501603b TO |
461 | /** |
462 | * Returns the names of this table | |
463 | * | |
464 | * @return string | |
465 | */ | |
c3fc2621 | 466 | public static function getTableName() { |
e501603b TO |
467 | return self::$_tableName; |
468 | } | |
c3fc2621 | 469 | |
e501603b TO |
470 | /** |
471 | * Returns if this table needs to be logged | |
472 | * | |
c3fc2621 | 473 | * @return bool |
e501603b | 474 | */ |
c3fc2621 | 475 | public function getLog() { |
e501603b TO |
476 | return self::$_log; |
477 | } | |
c3fc2621 | 478 | |
e501603b TO |
479 | /** |
480 | * Returns the list of fields that can be imported | |
481 | * | |
482 | * @param bool $prefix | |
483 | * | |
484 | * @return array | |
485 | */ | |
c3fc2621 CW |
486 | public static function &import($prefix = FALSE) { |
487 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contribution_widget', $prefix, []); | |
60808919 | 488 | return $r; |
e501603b | 489 | } |
c3fc2621 | 490 | |
e501603b TO |
491 | /** |
492 | * Returns the list of fields that can be exported | |
493 | * | |
494 | * @param bool $prefix | |
495 | * | |
496 | * @return array | |
497 | */ | |
c3fc2621 CW |
498 | public static function &export($prefix = FALSE) { |
499 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contribution_widget', $prefix, []); | |
60808919 | 500 | return $r; |
e501603b | 501 | } |
c3fc2621 | 502 | |
e7a6b91a AS |
503 | /** |
504 | * Returns the list of indices | |
c3fc2621 CW |
505 | * |
506 | * @param bool $localize | |
507 | * | |
508 | * @return array | |
e7a6b91a AS |
509 | */ |
510 | public static function indices($localize = TRUE) { | |
c3fc2621 | 511 | $indices = []; |
e7a6b91a AS |
512 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
513 | } | |
c3fc2621 | 514 | |
e501603b | 515 | } |