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/Event/ParticipantStatusType.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
74db51d3 | 9 | * (GenCodeChecksum:ff67f80115b20f29d4237edbfff9fe83) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the ParticipantStatusType entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO { |
c3fc2621 | 16 | |
e501603b | 17 | /** |
f41f0342 | 18 | * Static instance to hold the table name. |
e501603b TO |
19 | * |
20 | * @var string | |
21 | */ | |
fa45b5b9 | 22 | public static $_tableName = 'civicrm_participant_status_type'; |
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 | */ |
fa45b5b9 | 29 | public static $_log = TRUE; |
c3fc2621 | 30 | |
e501603b TO |
31 | /** |
32 | * unique participant status type id | |
33 | * | |
e6ca0a57 | 34 | * @var int |
e501603b TO |
35 | */ |
36 | public $id; | |
c3fc2621 | 37 | |
e501603b TO |
38 | /** |
39 | * non-localized name of the status type | |
40 | * | |
41 | * @var string | |
42 | */ | |
43 | public $name; | |
c3fc2621 | 44 | |
e501603b TO |
45 | /** |
46 | * localized label for display of this status type | |
47 | * | |
48 | * @var string | |
49 | */ | |
50 | public $label; | |
c3fc2621 | 51 | |
e501603b TO |
52 | /** |
53 | * the general group of status type this one belongs to | |
54 | * | |
55 | * @var string | |
56 | */ | |
57 | public $class; | |
c3fc2621 | 58 | |
e501603b TO |
59 | /** |
60 | * whether this is a status type required by the system | |
61 | * | |
e6ca0a57 | 62 | * @var bool |
e501603b TO |
63 | */ |
64 | public $is_reserved; | |
c3fc2621 | 65 | |
e501603b TO |
66 | /** |
67 | * whether this status type is active | |
68 | * | |
e6ca0a57 | 69 | * @var bool |
e501603b TO |
70 | */ |
71 | public $is_active; | |
c3fc2621 | 72 | |
e501603b TO |
73 | /** |
74 | * whether this status type is counted against event size limit | |
75 | * | |
e6ca0a57 | 76 | * @var bool |
e501603b TO |
77 | */ |
78 | public $is_counted; | |
c3fc2621 | 79 | |
e501603b TO |
80 | /** |
81 | * controls sort order | |
82 | * | |
e6ca0a57 | 83 | * @var int |
e501603b TO |
84 | */ |
85 | public $weight; | |
c3fc2621 | 86 | |
e501603b TO |
87 | /** |
88 | * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group | |
89 | * | |
e6ca0a57 | 90 | * @var int |
e501603b TO |
91 | */ |
92 | public $visibility_id; | |
c3fc2621 | 93 | |
e501603b | 94 | /** |
f41f0342 | 95 | * Class constructor. |
e501603b | 96 | */ |
c3fc2621 | 97 | public function __construct() { |
e501603b TO |
98 | $this->__table = 'civicrm_participant_status_type'; |
99 | parent::__construct(); | |
100 | } | |
c3fc2621 | 101 | |
e501603b TO |
102 | /** |
103 | * Returns all the column names of this table | |
104 | * | |
105 | * @return array | |
106 | */ | |
c3fc2621 | 107 | public static function &fields() { |
346aaaba | 108 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
109 | Civi::$statics[__CLASS__]['fields'] = [ |
110 | 'id' => [ | |
e501603b TO |
111 | 'name' => 'id', |
112 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 113 | 'title' => ts('Participant Status Type ID'), |
215b423e | 114 | 'description' => ts('unique participant status type id'), |
c3fc2621 | 115 | 'required' => TRUE, |
a36434b9 | 116 | 'where' => 'civicrm_participant_status_type.id', |
522a26c9 | 117 | 'table_name' => 'civicrm_participant_status_type', |
118 | 'entity' => 'ParticipantStatusType', | |
119 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 120 | 'localizable' => 0, |
c3fc2621 CW |
121 | ], |
122 | 'participant_status' => [ | |
e501603b TO |
123 | 'name' => 'name', |
124 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 125 | 'title' => ts('Participant Status'), |
215b423e | 126 | 'description' => ts('non-localized name of the status type'), |
e501603b TO |
127 | 'maxlength' => 64, |
128 | 'size' => CRM_Utils_Type::BIG, | |
c3fc2621 | 129 | 'import' => TRUE, |
e501603b | 130 | 'where' => 'civicrm_participant_status_type.name', |
c3fc2621 | 131 | 'export' => TRUE, |
522a26c9 | 132 | 'table_name' => 'civicrm_participant_status_type', |
133 | 'entity' => 'ParticipantStatusType', | |
134 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 135 | 'localizable' => 0, |
c3fc2621 CW |
136 | ], |
137 | 'label' => [ | |
e501603b TO |
138 | 'name' => 'label', |
139 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 140 | 'title' => ts('Participant Status Label'), |
215b423e | 141 | 'description' => ts('localized label for display of this status type'), |
e501603b TO |
142 | 'maxlength' => 255, |
143 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 144 | 'where' => 'civicrm_participant_status_type.label', |
522a26c9 | 145 | 'table_name' => 'civicrm_participant_status_type', |
146 | 'entity' => 'ParticipantStatusType', | |
147 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 148 | 'localizable' => 1, |
c3fc2621 CW |
149 | ], |
150 | 'class' => [ | |
e501603b TO |
151 | 'name' => 'class', |
152 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 153 | 'title' => ts('Participant Status Class'), |
215b423e | 154 | 'description' => ts('the general group of status type this one belongs to'), |
e501603b TO |
155 | 'maxlength' => 8, |
156 | 'size' => CRM_Utils_Type::EIGHT, | |
a36434b9 | 157 | 'where' => 'civicrm_participant_status_type.class', |
522a26c9 | 158 | 'table_name' => 'civicrm_participant_status_type', |
159 | 'entity' => 'ParticipantStatusType', | |
160 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 161 | 'localizable' => 0, |
c3fc2621 | 162 | 'html' => [ |
e501603b | 163 | 'type' => 'Select', |
c3fc2621 CW |
164 | ], |
165 | 'pseudoconstant' => [ | |
e501603b | 166 | 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions', |
e6ca0a57 | 167 | ], |
c3fc2621 CW |
168 | ], |
169 | 'is_reserved' => [ | |
e501603b TO |
170 | 'name' => 'is_reserved', |
171 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 172 | 'title' => ts('Participant Status Is Reserved?>'), |
215b423e | 173 | 'description' => ts('whether this is a status type required by the system'), |
a36434b9 | 174 | 'where' => 'civicrm_participant_status_type.is_reserved', |
522a26c9 | 175 | 'table_name' => 'civicrm_participant_status_type', |
176 | 'entity' => 'ParticipantStatusType', | |
177 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 178 | 'localizable' => 0, |
c3fc2621 CW |
179 | ], |
180 | 'is_active' => [ | |
e501603b TO |
181 | 'name' => 'is_active', |
182 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 183 | 'title' => ts('Participant Status is Active'), |
215b423e | 184 | 'description' => ts('whether this status type is active'), |
a36434b9 | 185 | 'where' => 'civicrm_participant_status_type.is_active', |
e501603b | 186 | 'default' => '1', |
522a26c9 | 187 | 'table_name' => 'civicrm_participant_status_type', |
188 | 'entity' => 'ParticipantStatusType', | |
189 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 190 | 'localizable' => 0, |
c3fc2621 CW |
191 | ], |
192 | 'is_counted' => [ | |
e501603b TO |
193 | 'name' => 'is_counted', |
194 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 195 | 'title' => ts('Participant Status Counts?'), |
215b423e | 196 | 'description' => ts('whether this status type is counted against event size limit'), |
a36434b9 | 197 | 'where' => 'civicrm_participant_status_type.is_counted', |
522a26c9 | 198 | 'table_name' => 'civicrm_participant_status_type', |
199 | 'entity' => 'ParticipantStatusType', | |
200 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 201 | 'localizable' => 0, |
c3fc2621 CW |
202 | ], |
203 | 'weight' => [ | |
e501603b TO |
204 | 'name' => 'weight', |
205 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 206 | 'title' => ts('Order'), |
215b423e | 207 | 'description' => ts('controls sort order'), |
c3fc2621 | 208 | 'required' => TRUE, |
a36434b9 | 209 | 'where' => 'civicrm_participant_status_type.weight', |
522a26c9 | 210 | 'table_name' => 'civicrm_participant_status_type', |
211 | 'entity' => 'ParticipantStatusType', | |
212 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 213 | 'localizable' => 0, |
c3fc2621 CW |
214 | ], |
215 | 'visibility_id' => [ | |
e501603b TO |
216 | 'name' => 'visibility_id', |
217 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 218 | 'title' => ts('Participant Status Visibility'), |
215b423e | 219 | 'description' => ts('whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group'), |
a36434b9 | 220 | 'where' => 'civicrm_participant_status_type.visibility_id', |
522a26c9 | 221 | 'table_name' => 'civicrm_participant_status_type', |
222 | 'entity' => 'ParticipantStatusType', | |
223 | 'bao' => 'CRM_Event_BAO_ParticipantStatusType', | |
6a7e5e5d | 224 | 'localizable' => 0, |
c3fc2621 | 225 | 'html' => [ |
e501603b | 226 | 'type' => 'Select', |
c3fc2621 CW |
227 | ], |
228 | 'pseudoconstant' => [ | |
e501603b TO |
229 | 'optionGroupName' => 'visibility', |
230 | 'optionEditPath' => 'civicrm/admin/options/visibility', | |
e6ca0a57 | 231 | ], |
c3fc2621 CW |
232 | ], |
233 | ]; | |
346aaaba | 234 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 235 | } |
346aaaba | 236 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 237 | } |
c3fc2621 | 238 | |
e501603b | 239 | /** |
bd8e0b14 | 240 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
241 | * |
242 | * @return array | |
bd8e0b14 | 243 | * Array(string $name => string $uniqueName). |
e501603b | 244 | */ |
c3fc2621 | 245 | public static function &fieldKeys() { |
bd8e0b14 TO |
246 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
247 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 248 | } |
bd8e0b14 | 249 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 250 | } |
c3fc2621 | 251 | |
e501603b TO |
252 | /** |
253 | * Returns the names of this table | |
254 | * | |
255 | * @return string | |
256 | */ | |
c3fc2621 | 257 | public static function getTableName() { |
e501603b TO |
258 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); |
259 | } | |
c3fc2621 | 260 | |
e501603b TO |
261 | /** |
262 | * Returns if this table needs to be logged | |
263 | * | |
c3fc2621 | 264 | * @return bool |
e501603b | 265 | */ |
c3fc2621 | 266 | public function getLog() { |
e501603b TO |
267 | return self::$_log; |
268 | } | |
c3fc2621 | 269 | |
e501603b TO |
270 | /** |
271 | * Returns the list of fields that can be imported | |
272 | * | |
273 | * @param bool $prefix | |
274 | * | |
275 | * @return array | |
276 | */ | |
c3fc2621 CW |
277 | public static function &import($prefix = FALSE) { |
278 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant_status_type', $prefix, []); | |
60808919 | 279 | return $r; |
e501603b | 280 | } |
c3fc2621 | 281 | |
e501603b TO |
282 | /** |
283 | * Returns the list of fields that can be exported | |
284 | * | |
285 | * @param bool $prefix | |
286 | * | |
287 | * @return array | |
288 | */ | |
c3fc2621 CW |
289 | public static function &export($prefix = FALSE) { |
290 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant_status_type', $prefix, []); | |
60808919 | 291 | return $r; |
e501603b | 292 | } |
c3fc2621 | 293 | |
e7a6b91a AS |
294 | /** |
295 | * Returns the list of indices | |
c3fc2621 CW |
296 | * |
297 | * @param bool $localize | |
298 | * | |
299 | * @return array | |
e7a6b91a AS |
300 | */ |
301 | public static function indices($localize = TRUE) { | |
c3fc2621 | 302 | $indices = []; |
e7a6b91a AS |
303 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
304 | } | |
c3fc2621 | 305 | |
e501603b | 306 | } |