Commit | Line | Data |
---|---|---|
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/RecurringEntity.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
022785d8 | 9 | * (GenCodeChecksum:926c9bc8d5175511764721bc9dc8562a) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the RecurringEntity entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Core_DAO_RecurringEntity 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_recurring_entity'; | |
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 = TRUE; |
30 | ||
e501603b | 31 | /** |
e501603b TO |
32 | * @var int unsigned |
33 | */ | |
34 | public $id; | |
c3fc2621 | 35 | |
e501603b TO |
36 | /** |
37 | * Recurring Entity Parent ID | |
38 | * | |
39 | * @var int unsigned | |
40 | */ | |
41 | public $parent_id; | |
c3fc2621 | 42 | |
e501603b TO |
43 | /** |
44 | * Recurring Entity Child ID | |
45 | * | |
46 | * @var int unsigned | |
47 | */ | |
48 | public $entity_id; | |
c3fc2621 | 49 | |
e501603b TO |
50 | /** |
51 | * Physical tablename for entity, e.g. civicrm_event | |
52 | * | |
53 | * @var string | |
54 | */ | |
55 | public $entity_table; | |
c3fc2621 | 56 | |
e501603b TO |
57 | /** |
58 | * 1-this entity, 2-this and the following entities, 3-all the entities | |
59 | * | |
60 | * @var boolean | |
61 | */ | |
62 | public $mode; | |
c3fc2621 | 63 | |
e501603b | 64 | /** |
f41f0342 | 65 | * Class constructor. |
e501603b | 66 | */ |
c3fc2621 | 67 | public function __construct() { |
e501603b TO |
68 | $this->__table = 'civicrm_recurring_entity'; |
69 | parent::__construct(); | |
70 | } | |
c3fc2621 | 71 | |
e501603b TO |
72 | /** |
73 | * Returns all the column names of this table | |
74 | * | |
75 | * @return array | |
76 | */ | |
c3fc2621 | 77 | public static function &fields() { |
346aaaba | 78 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
79 | Civi::$statics[__CLASS__]['fields'] = [ |
80 | 'id' => [ | |
e501603b TO |
81 | 'name' => 'id', |
82 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 CW |
83 | 'title' => ts('ID'), |
84 | 'required' => TRUE, | |
522a26c9 | 85 | 'table_name' => 'civicrm_recurring_entity', |
86 | 'entity' => 'RecurringEntity', | |
87 | 'bao' => 'CRM_Core_BAO_RecurringEntity', | |
6a7e5e5d | 88 | 'localizable' => 0, |
c3fc2621 CW |
89 | ], |
90 | 'parent_id' => [ | |
e501603b TO |
91 | 'name' => 'parent_id', |
92 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 93 | 'title' => ts('Parent ID'), |
e501603b | 94 | 'description' => 'Recurring Entity Parent ID', |
c3fc2621 | 95 | 'required' => TRUE, |
522a26c9 | 96 | 'table_name' => 'civicrm_recurring_entity', |
97 | 'entity' => 'RecurringEntity', | |
98 | 'bao' => 'CRM_Core_BAO_RecurringEntity', | |
6a7e5e5d | 99 | 'localizable' => 0, |
c3fc2621 CW |
100 | ], |
101 | 'entity_id' => [ | |
e501603b TO |
102 | 'name' => 'entity_id', |
103 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 104 | 'title' => ts('Entity ID'), |
e501603b | 105 | 'description' => 'Recurring Entity Child ID', |
522a26c9 | 106 | 'table_name' => 'civicrm_recurring_entity', |
107 | 'entity' => 'RecurringEntity', | |
108 | 'bao' => 'CRM_Core_BAO_RecurringEntity', | |
6a7e5e5d | 109 | 'localizable' => 0, |
c3fc2621 CW |
110 | ], |
111 | 'entity_table' => [ | |
e501603b TO |
112 | 'name' => 'entity_table', |
113 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 114 | 'title' => ts('Entity Table'), |
e501603b | 115 | 'description' => 'Physical tablename for entity, e.g. civicrm_event', |
c3fc2621 | 116 | 'required' => TRUE, |
e501603b TO |
117 | 'maxlength' => 64, |
118 | 'size' => CRM_Utils_Type::BIG, | |
522a26c9 | 119 | 'table_name' => 'civicrm_recurring_entity', |
120 | 'entity' => 'RecurringEntity', | |
121 | 'bao' => 'CRM_Core_BAO_RecurringEntity', | |
6a7e5e5d | 122 | 'localizable' => 0, |
c3fc2621 CW |
123 | ], |
124 | 'mode' => [ | |
e501603b TO |
125 | 'name' => 'mode', |
126 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 127 | 'title' => ts('Cascade Type'), |
e501603b | 128 | 'description' => '1-this entity, 2-this and the following entities, 3-all the entities', |
c3fc2621 | 129 | 'required' => TRUE, |
e501603b | 130 | 'default' => '1', |
522a26c9 | 131 | 'table_name' => 'civicrm_recurring_entity', |
132 | 'entity' => 'RecurringEntity', | |
133 | 'bao' => 'CRM_Core_BAO_RecurringEntity', | |
6a7e5e5d | 134 | 'localizable' => 0, |
c3fc2621 CW |
135 | ], |
136 | ]; | |
346aaaba | 137 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 138 | } |
346aaaba | 139 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 140 | } |
c3fc2621 | 141 | |
e501603b | 142 | /** |
bd8e0b14 | 143 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
144 | * |
145 | * @return array | |
bd8e0b14 | 146 | * Array(string $name => string $uniqueName). |
e501603b | 147 | */ |
c3fc2621 | 148 | public static function &fieldKeys() { |
bd8e0b14 TO |
149 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
150 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 151 | } |
bd8e0b14 | 152 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 153 | } |
c3fc2621 | 154 | |
e501603b TO |
155 | /** |
156 | * Returns the names of this table | |
157 | * | |
158 | * @return string | |
159 | */ | |
c3fc2621 | 160 | public static function getTableName() { |
e501603b TO |
161 | return self::$_tableName; |
162 | } | |
c3fc2621 | 163 | |
e501603b TO |
164 | /** |
165 | * Returns if this table needs to be logged | |
166 | * | |
c3fc2621 | 167 | * @return bool |
e501603b | 168 | */ |
c3fc2621 | 169 | public function getLog() { |
e501603b TO |
170 | return self::$_log; |
171 | } | |
c3fc2621 | 172 | |
e501603b TO |
173 | /** |
174 | * Returns the list of fields that can be imported | |
175 | * | |
176 | * @param bool $prefix | |
177 | * | |
178 | * @return array | |
179 | */ | |
c3fc2621 CW |
180 | public static function &import($prefix = FALSE) { |
181 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'recurring_entity', $prefix, []); | |
60808919 | 182 | return $r; |
e501603b | 183 | } |
c3fc2621 | 184 | |
e501603b TO |
185 | /** |
186 | * Returns the list of fields that can be exported | |
187 | * | |
188 | * @param bool $prefix | |
189 | * | |
190 | * @return array | |
191 | */ | |
c3fc2621 CW |
192 | public static function &export($prefix = FALSE) { |
193 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'recurring_entity', $prefix, []); | |
60808919 | 194 | return $r; |
e501603b | 195 | } |
c3fc2621 | 196 | |
e7a6b91a AS |
197 | /** |
198 | * Returns the list of indices | |
c3fc2621 CW |
199 | * |
200 | * @param bool $localize | |
201 | * | |
202 | * @return array | |
e7a6b91a AS |
203 | */ |
204 | public static function indices($localize = TRUE) { | |
c3fc2621 | 205 | $indices = []; |
e7a6b91a AS |
206 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
207 | } | |
c3fc2621 | 208 | |
e501603b | 209 | } |