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:ede2497e706ee17bb6dce92b72a2c535)
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 localized title of this entity.
105 public static function getEntityTitle() {
106 return ts('Participant Status Types');
110 * Returns all the column names of this table
114 public static function &fields() {
115 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
116 Civi
::$statics[__CLASS__
]['fields'] = [
119 'type' => CRM_Utils_Type
::T_INT
,
120 'title' => ts('Participant Status Type ID'),
121 'description' => ts('unique participant status type id'),
123 'where' => 'civicrm_participant_status_type.id',
124 'table_name' => 'civicrm_participant_status_type',
125 'entity' => 'ParticipantStatusType',
126 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
130 'participant_status' => [
132 'type' => CRM_Utils_Type
::T_STRING
,
133 'title' => ts('Participant Status'),
134 'description' => ts('non-localized name of the status type'),
136 'size' => CRM_Utils_Type
::BIG
,
138 'where' => 'civicrm_participant_status_type.name',
140 'table_name' => 'civicrm_participant_status_type',
141 'entity' => 'ParticipantStatusType',
142 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
148 'type' => CRM_Utils_Type
::T_STRING
,
149 'title' => ts('Participant Status Label'),
150 'description' => ts('localized label for display of this status type'),
152 'size' => CRM_Utils_Type
::HUGE
,
153 'where' => 'civicrm_participant_status_type.label',
154 'table_name' => 'civicrm_participant_status_type',
155 'entity' => 'ParticipantStatusType',
156 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
162 'type' => CRM_Utils_Type
::T_STRING
,
163 'title' => ts('Participant Status Class'),
164 'description' => ts('the general group of status type this one belongs to'),
166 'size' => CRM_Utils_Type
::EIGHT
,
167 'where' => 'civicrm_participant_status_type.class',
168 'table_name' => 'civicrm_participant_status_type',
169 'entity' => 'ParticipantStatusType',
170 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
175 'pseudoconstant' => [
176 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
181 'name' => 'is_reserved',
182 'type' => CRM_Utils_Type
::T_BOOLEAN
,
183 'title' => ts('Participant Status Is Reserved?>'),
184 'description' => ts('whether this is a status type required by the system'),
185 'where' => 'civicrm_participant_status_type.is_reserved',
186 'table_name' => 'civicrm_participant_status_type',
187 'entity' => 'ParticipantStatusType',
188 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
193 'name' => 'is_active',
194 'type' => CRM_Utils_Type
::T_BOOLEAN
,
195 'title' => ts('Participant Status is Active'),
196 'description' => ts('whether this status type is active'),
197 'where' => 'civicrm_participant_status_type.is_active',
199 'table_name' => 'civicrm_participant_status_type',
200 'entity' => 'ParticipantStatusType',
201 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
206 'name' => 'is_counted',
207 'type' => CRM_Utils_Type
::T_BOOLEAN
,
208 'title' => ts('Participant Status Counts?'),
209 'description' => ts('whether this status type is counted against event size limit'),
210 'where' => 'civicrm_participant_status_type.is_counted',
211 'table_name' => 'civicrm_participant_status_type',
212 'entity' => 'ParticipantStatusType',
213 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
219 'type' => CRM_Utils_Type
::T_INT
,
220 'title' => ts('Order'),
221 'description' => ts('controls sort order'),
223 'where' => 'civicrm_participant_status_type.weight',
224 'table_name' => 'civicrm_participant_status_type',
225 'entity' => 'ParticipantStatusType',
226 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
231 'name' => 'visibility_id',
232 'type' => CRM_Utils_Type
::T_INT
,
233 'title' => ts('Participant Status Visibility'),
234 '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'),
235 'where' => 'civicrm_participant_status_type.visibility_id',
236 'table_name' => 'civicrm_participant_status_type',
237 'entity' => 'ParticipantStatusType',
238 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
243 'pseudoconstant' => [
244 'optionGroupName' => 'visibility',
245 'optionEditPath' => 'civicrm/admin/options/visibility',
250 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
252 return Civi
::$statics[__CLASS__
]['fields'];
256 * Return a mapping from field-name to the corresponding key (as used in fields()).
259 * Array(string $name => string $uniqueName).
261 public static function &fieldKeys() {
262 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
263 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
265 return Civi
::$statics[__CLASS__
]['fieldKeys'];
269 * Returns the names of this table
273 public static function getTableName() {
274 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
278 * Returns if this table needs to be logged
282 public function getLog() {
287 * Returns the list of fields that can be imported
289 * @param bool $prefix
293 public static function &import($prefix = FALSE) {
294 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
299 * Returns the list of fields that can be exported
301 * @param bool $prefix
305 public static function &export($prefix = FALSE) {
306 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
311 * Returns the list of indices
313 * @param bool $localize
317 public static function indices($localize = TRUE) {
319 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;