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:0f5f8f9d2171b25bb250914d746996bc)
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';
18 const COMPONENT
= 'CiviEvent';
21 * Static instance to hold the table name.
25 public static $_tableName = 'civicrm_participant_status_type';
28 * Should CiviCRM log any modifications to this table in the civicrm_log table.
32 public static $_log = TRUE;
35 * unique participant status type id
42 * non-localized name of the status type
49 * localized label for display of this status type
56 * the general group of status type this one belongs to
63 * whether this is a status type required by the system
70 * whether this status type is active
77 * whether this status type is counted against event size limit
91 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
95 public $visibility_id;
100 public function __construct() {
101 $this->__table
= 'civicrm_participant_status_type';
102 parent
::__construct();
106 * Returns localized title of this entity.
108 * @param bool $plural
109 * Whether to return the plural version of the title.
111 public static function getEntityTitle($plural = FALSE) {
112 return $plural ?
ts('Participant Status Types') : ts('Participant Status Type');
116 * Returns all the column names of this table
120 public static function &fields() {
121 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
122 Civi
::$statics[__CLASS__
]['fields'] = [
125 'type' => CRM_Utils_Type
::T_INT
,
126 'title' => ts('Participant Status Type ID'),
127 'description' => ts('unique participant status type id'),
129 'where' => 'civicrm_participant_status_type.id',
130 'table_name' => 'civicrm_participant_status_type',
131 'entity' => 'ParticipantStatusType',
132 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
140 'participant_status' => [
142 'type' => CRM_Utils_Type
::T_STRING
,
143 'title' => ts('Participant Status'),
144 'description' => ts('non-localized name of the status type'),
146 'size' => CRM_Utils_Type
::BIG
,
148 'where' => 'civicrm_participant_status_type.name',
150 'table_name' => 'civicrm_participant_status_type',
151 'entity' => 'ParticipantStatusType',
152 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
158 'type' => CRM_Utils_Type
::T_STRING
,
159 'title' => ts('Participant Status Label'),
160 'description' => ts('localized label for display of this status type'),
162 'size' => CRM_Utils_Type
::HUGE
,
163 'where' => 'civicrm_participant_status_type.label',
164 'table_name' => 'civicrm_participant_status_type',
165 'entity' => 'ParticipantStatusType',
166 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
172 'type' => CRM_Utils_Type
::T_STRING
,
173 'title' => ts('Participant Status Class'),
174 'description' => ts('the general group of status type this one belongs to'),
176 'size' => CRM_Utils_Type
::EIGHT
,
177 'where' => 'civicrm_participant_status_type.class',
178 'table_name' => 'civicrm_participant_status_type',
179 'entity' => 'ParticipantStatusType',
180 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
185 'pseudoconstant' => [
186 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
191 'name' => 'is_reserved',
192 'type' => CRM_Utils_Type
::T_BOOLEAN
,
193 'title' => ts('Participant Status Is Reserved?>'),
194 'description' => ts('whether this is a status type required by the system'),
195 'where' => 'civicrm_participant_status_type.is_reserved',
196 'table_name' => 'civicrm_participant_status_type',
197 'entity' => 'ParticipantStatusType',
198 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
203 'name' => 'is_active',
204 'type' => CRM_Utils_Type
::T_BOOLEAN
,
205 'title' => ts('Participant Status is Active'),
206 'description' => ts('whether this status type is active'),
207 'where' => 'civicrm_participant_status_type.is_active',
209 'table_name' => 'civicrm_participant_status_type',
210 'entity' => 'ParticipantStatusType',
211 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
216 'name' => 'is_counted',
217 'type' => CRM_Utils_Type
::T_BOOLEAN
,
218 'title' => ts('Participant Status Counts?'),
219 'description' => ts('whether this status type is counted against event size limit'),
220 'where' => 'civicrm_participant_status_type.is_counted',
221 'table_name' => 'civicrm_participant_status_type',
222 'entity' => 'ParticipantStatusType',
223 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
229 'type' => CRM_Utils_Type
::T_INT
,
230 'title' => ts('Order'),
231 'description' => ts('controls sort order'),
233 'where' => 'civicrm_participant_status_type.weight',
234 'table_name' => 'civicrm_participant_status_type',
235 'entity' => 'ParticipantStatusType',
236 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
241 'name' => 'visibility_id',
242 'type' => CRM_Utils_Type
::T_INT
,
243 'title' => ts('Participant Status Visibility'),
244 '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'),
245 'where' => 'civicrm_participant_status_type.visibility_id',
246 'table_name' => 'civicrm_participant_status_type',
247 'entity' => 'ParticipantStatusType',
248 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
253 'pseudoconstant' => [
254 'optionGroupName' => 'visibility',
255 'optionEditPath' => 'civicrm/admin/options/visibility',
260 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
262 return Civi
::$statics[__CLASS__
]['fields'];
266 * Return a mapping from field-name to the corresponding key (as used in fields()).
269 * Array(string $name => string $uniqueName).
271 public static function &fieldKeys() {
272 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
273 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
275 return Civi
::$statics[__CLASS__
]['fieldKeys'];
279 * Returns the names of this table
283 public static function getTableName() {
284 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
288 * Returns if this table needs to be logged
292 public function getLog() {
297 * Returns the list of fields that can be imported
299 * @param bool $prefix
303 public static function &import($prefix = FALSE) {
304 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
309 * Returns the list of fields that can be exported
311 * @param bool $prefix
315 public static function &export($prefix = FALSE) {
316 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
321 * Returns the list of indices
323 * @param bool $localize
327 public static function indices($localize = TRUE) {
329 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;