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:4a3012f88c67826cb4264a3340e908ec)
13 * Database access object for the ParticipantStatusType entity.
15 class CRM_Event_DAO_ParticipantStatusType
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '3.0';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_participant_status_type';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = TRUE;
34 * unique participant status type id
41 * non-localized name of the status type
48 * localized label for display of this status type
55 * the general group of status type this one belongs to
62 * whether this is a status type required by the system
69 * whether this status type is active
76 * whether this status type is counted against event size limit
90 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
94 public $visibility_id;
99 public function __construct() {
100 $this->__table
= 'civicrm_participant_status_type';
101 parent
::__construct();
105 * Returns localized title of this entity.
107 public static function getEntityTitle() {
108 return ts('Participant Status Types');
112 * Returns all the column names of this table
116 public static function &fields() {
117 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
118 Civi
::$statics[__CLASS__
]['fields'] = [
121 'type' => CRM_Utils_Type
::T_INT
,
122 'title' => ts('Participant Status Type ID'),
123 'description' => ts('unique participant status type id'),
125 'where' => 'civicrm_participant_status_type.id',
126 'table_name' => 'civicrm_participant_status_type',
127 'entity' => 'ParticipantStatusType',
128 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
132 'participant_status' => [
134 'type' => CRM_Utils_Type
::T_STRING
,
135 'title' => ts('Participant Status'),
136 'description' => ts('non-localized name of the status type'),
138 'size' => CRM_Utils_Type
::BIG
,
140 'where' => 'civicrm_participant_status_type.name',
142 'table_name' => 'civicrm_participant_status_type',
143 'entity' => 'ParticipantStatusType',
144 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
150 'type' => CRM_Utils_Type
::T_STRING
,
151 'title' => ts('Participant Status Label'),
152 'description' => ts('localized label for display of this status type'),
154 'size' => CRM_Utils_Type
::HUGE
,
155 'where' => 'civicrm_participant_status_type.label',
156 'table_name' => 'civicrm_participant_status_type',
157 'entity' => 'ParticipantStatusType',
158 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
164 'type' => CRM_Utils_Type
::T_STRING
,
165 'title' => ts('Participant Status Class'),
166 'description' => ts('the general group of status type this one belongs to'),
168 'size' => CRM_Utils_Type
::EIGHT
,
169 'where' => 'civicrm_participant_status_type.class',
170 'table_name' => 'civicrm_participant_status_type',
171 'entity' => 'ParticipantStatusType',
172 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
177 'pseudoconstant' => [
178 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
183 'name' => 'is_reserved',
184 'type' => CRM_Utils_Type
::T_BOOLEAN
,
185 'title' => ts('Participant Status Is Reserved?>'),
186 'description' => ts('whether this is a status type required by the system'),
187 'where' => 'civicrm_participant_status_type.is_reserved',
188 'table_name' => 'civicrm_participant_status_type',
189 'entity' => 'ParticipantStatusType',
190 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
195 'name' => 'is_active',
196 'type' => CRM_Utils_Type
::T_BOOLEAN
,
197 'title' => ts('Participant Status is Active'),
198 'description' => ts('whether this status type is active'),
199 'where' => 'civicrm_participant_status_type.is_active',
201 'table_name' => 'civicrm_participant_status_type',
202 'entity' => 'ParticipantStatusType',
203 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
208 'name' => 'is_counted',
209 'type' => CRM_Utils_Type
::T_BOOLEAN
,
210 'title' => ts('Participant Status Counts?'),
211 'description' => ts('whether this status type is counted against event size limit'),
212 'where' => 'civicrm_participant_status_type.is_counted',
213 'table_name' => 'civicrm_participant_status_type',
214 'entity' => 'ParticipantStatusType',
215 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
221 'type' => CRM_Utils_Type
::T_INT
,
222 'title' => ts('Order'),
223 'description' => ts('controls sort order'),
225 'where' => 'civicrm_participant_status_type.weight',
226 'table_name' => 'civicrm_participant_status_type',
227 'entity' => 'ParticipantStatusType',
228 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
233 'name' => 'visibility_id',
234 'type' => CRM_Utils_Type
::T_INT
,
235 'title' => ts('Participant Status Visibility'),
236 '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'),
237 'where' => 'civicrm_participant_status_type.visibility_id',
238 'table_name' => 'civicrm_participant_status_type',
239 'entity' => 'ParticipantStatusType',
240 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
245 'pseudoconstant' => [
246 'optionGroupName' => 'visibility',
247 'optionEditPath' => 'civicrm/admin/options/visibility',
252 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
254 return Civi
::$statics[__CLASS__
]['fields'];
258 * Return a mapping from field-name to the corresponding key (as used in fields()).
261 * Array(string $name => string $uniqueName).
263 public static function &fieldKeys() {
264 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
265 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
267 return Civi
::$statics[__CLASS__
]['fieldKeys'];
271 * Returns the names of this table
275 public static function getTableName() {
276 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
280 * Returns if this table needs to be logged
284 public function getLog() {
289 * Returns the list of fields that can be imported
291 * @param bool $prefix
295 public static function &import($prefix = FALSE) {
296 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
301 * Returns the list of fields that can be exported
303 * @param bool $prefix
307 public static function &export($prefix = FALSE) {
308 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
313 * Returns the list of indices
315 * @param bool $localize
319 public static function indices($localize = TRUE) {
321 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;