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:6bf827c56f673a914923346816449255)
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 * @param bool $plural
108 * Whether to return the plural version of the title.
110 public static function getEntityTitle($plural = FALSE) {
111 return $plural ?
ts('Participant Status Types') : ts('Participant Status Type');
115 * Returns all the column names of this table
119 public static function &fields() {
120 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
121 Civi
::$statics[__CLASS__
]['fields'] = [
124 'type' => CRM_Utils_Type
::T_INT
,
125 'title' => ts('Participant Status Type ID'),
126 'description' => ts('unique participant status type id'),
128 'where' => 'civicrm_participant_status_type.id',
129 'table_name' => 'civicrm_participant_status_type',
130 'entity' => 'ParticipantStatusType',
131 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
135 'participant_status' => [
137 'type' => CRM_Utils_Type
::T_STRING
,
138 'title' => ts('Participant Status'),
139 'description' => ts('non-localized name of the status type'),
141 'size' => CRM_Utils_Type
::BIG
,
143 'where' => 'civicrm_participant_status_type.name',
145 'table_name' => 'civicrm_participant_status_type',
146 'entity' => 'ParticipantStatusType',
147 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
153 'type' => CRM_Utils_Type
::T_STRING
,
154 'title' => ts('Participant Status Label'),
155 'description' => ts('localized label for display of this status type'),
157 'size' => CRM_Utils_Type
::HUGE
,
158 'where' => 'civicrm_participant_status_type.label',
159 'table_name' => 'civicrm_participant_status_type',
160 'entity' => 'ParticipantStatusType',
161 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
167 'type' => CRM_Utils_Type
::T_STRING
,
168 'title' => ts('Participant Status Class'),
169 'description' => ts('the general group of status type this one belongs to'),
171 'size' => CRM_Utils_Type
::EIGHT
,
172 'where' => 'civicrm_participant_status_type.class',
173 'table_name' => 'civicrm_participant_status_type',
174 'entity' => 'ParticipantStatusType',
175 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
180 'pseudoconstant' => [
181 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
186 'name' => 'is_reserved',
187 'type' => CRM_Utils_Type
::T_BOOLEAN
,
188 'title' => ts('Participant Status Is Reserved?>'),
189 'description' => ts('whether this is a status type required by the system'),
190 'where' => 'civicrm_participant_status_type.is_reserved',
191 'table_name' => 'civicrm_participant_status_type',
192 'entity' => 'ParticipantStatusType',
193 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
198 'name' => 'is_active',
199 'type' => CRM_Utils_Type
::T_BOOLEAN
,
200 'title' => ts('Participant Status is Active'),
201 'description' => ts('whether this status type is active'),
202 'where' => 'civicrm_participant_status_type.is_active',
204 'table_name' => 'civicrm_participant_status_type',
205 'entity' => 'ParticipantStatusType',
206 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
211 'name' => 'is_counted',
212 'type' => CRM_Utils_Type
::T_BOOLEAN
,
213 'title' => ts('Participant Status Counts?'),
214 'description' => ts('whether this status type is counted against event size limit'),
215 'where' => 'civicrm_participant_status_type.is_counted',
216 'table_name' => 'civicrm_participant_status_type',
217 'entity' => 'ParticipantStatusType',
218 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
224 'type' => CRM_Utils_Type
::T_INT
,
225 'title' => ts('Order'),
226 'description' => ts('controls sort order'),
228 'where' => 'civicrm_participant_status_type.weight',
229 'table_name' => 'civicrm_participant_status_type',
230 'entity' => 'ParticipantStatusType',
231 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
236 'name' => 'visibility_id',
237 'type' => CRM_Utils_Type
::T_INT
,
238 'title' => ts('Participant Status Visibility'),
239 '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'),
240 'where' => 'civicrm_participant_status_type.visibility_id',
241 'table_name' => 'civicrm_participant_status_type',
242 'entity' => 'ParticipantStatusType',
243 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
248 'pseudoconstant' => [
249 'optionGroupName' => 'visibility',
250 'optionEditPath' => 'civicrm/admin/options/visibility',
255 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
257 return Civi
::$statics[__CLASS__
]['fields'];
261 * Return a mapping from field-name to the corresponding key (as used in fields()).
264 * Array(string $name => string $uniqueName).
266 public static function &fieldKeys() {
267 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
268 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
270 return Civi
::$statics[__CLASS__
]['fieldKeys'];
274 * Returns the names of this table
278 public static function getTableName() {
279 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
283 * Returns if this table needs to be logged
287 public function getLog() {
292 * Returns the list of fields that can be imported
294 * @param bool $prefix
298 public static function &import($prefix = FALSE) {
299 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
304 * Returns the list of fields that can be exported
306 * @param bool $prefix
310 public static function &export($prefix = FALSE) {
311 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
316 * Returns the list of indices
318 * @param bool $localize
322 public static function indices($localize = TRUE) {
324 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;