5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:ff67f80115b20f29d4237edbfff9fe83)
13 * Database access object for the ParticipantStatusType entity.
15 class CRM_Event_DAO_ParticipantStatusType
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_participant_status_type';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
32 * unique participant status type id
39 * non-localized name of the status type
46 * localized label for display of this status type
53 * the general group of status type this one belongs to
60 * whether this is a status type required by the system
67 * whether this status type is active
74 * whether this status type is counted against event size limit
88 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
92 public $visibility_id;
97 public function __construct() {
98 $this->__table
= 'civicrm_participant_status_type';
99 parent
::__construct();
103 * Returns all the column names of this table
107 public static function &fields() {
108 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
109 Civi
::$statics[__CLASS__
]['fields'] = [
112 'type' => CRM_Utils_Type
::T_INT
,
113 'title' => ts('Participant Status Type ID'),
114 'description' => ts('unique participant status type id'),
116 'where' => 'civicrm_participant_status_type.id',
117 'table_name' => 'civicrm_participant_status_type',
118 'entity' => 'ParticipantStatusType',
119 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
122 'participant_status' => [
124 'type' => CRM_Utils_Type
::T_STRING
,
125 'title' => ts('Participant Status'),
126 'description' => ts('non-localized name of the status type'),
128 'size' => CRM_Utils_Type
::BIG
,
130 'where' => 'civicrm_participant_status_type.name',
132 'table_name' => 'civicrm_participant_status_type',
133 'entity' => 'ParticipantStatusType',
134 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
139 'type' => CRM_Utils_Type
::T_STRING
,
140 'title' => ts('Participant Status Label'),
141 'description' => ts('localized label for display of this status type'),
143 'size' => CRM_Utils_Type
::HUGE
,
144 'where' => 'civicrm_participant_status_type.label',
145 'table_name' => 'civicrm_participant_status_type',
146 'entity' => 'ParticipantStatusType',
147 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
152 'type' => CRM_Utils_Type
::T_STRING
,
153 'title' => ts('Participant Status Class'),
154 'description' => ts('the general group of status type this one belongs to'),
156 'size' => CRM_Utils_Type
::EIGHT
,
157 'where' => 'civicrm_participant_status_type.class',
158 'table_name' => 'civicrm_participant_status_type',
159 'entity' => 'ParticipantStatusType',
160 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
165 'pseudoconstant' => [
166 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
170 'name' => 'is_reserved',
171 'type' => CRM_Utils_Type
::T_BOOLEAN
,
172 'title' => ts('Participant Status Is Reserved?>'),
173 'description' => ts('whether this is a status type required by the system'),
174 'where' => 'civicrm_participant_status_type.is_reserved',
175 'table_name' => 'civicrm_participant_status_type',
176 'entity' => 'ParticipantStatusType',
177 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
181 'name' => 'is_active',
182 'type' => CRM_Utils_Type
::T_BOOLEAN
,
183 'title' => ts('Participant Status is Active'),
184 'description' => ts('whether this status type is active'),
185 'where' => 'civicrm_participant_status_type.is_active',
187 'table_name' => 'civicrm_participant_status_type',
188 'entity' => 'ParticipantStatusType',
189 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
193 'name' => 'is_counted',
194 'type' => CRM_Utils_Type
::T_BOOLEAN
,
195 'title' => ts('Participant Status Counts?'),
196 'description' => ts('whether this status type is counted against event size limit'),
197 'where' => 'civicrm_participant_status_type.is_counted',
198 'table_name' => 'civicrm_participant_status_type',
199 'entity' => 'ParticipantStatusType',
200 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
205 'type' => CRM_Utils_Type
::T_INT
,
206 'title' => ts('Order'),
207 'description' => ts('controls sort order'),
209 'where' => 'civicrm_participant_status_type.weight',
210 'table_name' => 'civicrm_participant_status_type',
211 'entity' => 'ParticipantStatusType',
212 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
216 'name' => 'visibility_id',
217 'type' => CRM_Utils_Type
::T_INT
,
218 'title' => ts('Participant Status Visibility'),
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'),
220 'where' => 'civicrm_participant_status_type.visibility_id',
221 'table_name' => 'civicrm_participant_status_type',
222 'entity' => 'ParticipantStatusType',
223 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
228 'pseudoconstant' => [
229 'optionGroupName' => 'visibility',
230 'optionEditPath' => 'civicrm/admin/options/visibility',
234 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
236 return Civi
::$statics[__CLASS__
]['fields'];
240 * Return a mapping from field-name to the corresponding key (as used in fields()).
243 * Array(string $name => string $uniqueName).
245 public static function &fieldKeys() {
246 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
247 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
249 return Civi
::$statics[__CLASS__
]['fieldKeys'];
253 * Returns the names of this table
257 public static function getTableName() {
258 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
262 * Returns if this table needs to be logged
266 public function getLog() {
271 * Returns the list of fields that can be imported
273 * @param bool $prefix
277 public static function &import($prefix = FALSE) {
278 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
283 * Returns the list of fields that can be exported
285 * @param bool $prefix
289 public static function &export($prefix = FALSE) {
290 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
295 * Returns the list of indices
297 * @param bool $localize
301 public static function indices($localize = TRUE) {
303 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;