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:7390922bd58d23808a484981bd822aed)
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',
136 'participant_status' => [
138 'type' => CRM_Utils_Type
::T_STRING
,
139 'title' => ts('Participant Status'),
140 'description' => ts('non-localized name of the status type'),
142 'size' => CRM_Utils_Type
::BIG
,
144 'where' => 'civicrm_participant_status_type.name',
146 'table_name' => 'civicrm_participant_status_type',
147 'entity' => 'ParticipantStatusType',
148 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
154 'type' => CRM_Utils_Type
::T_STRING
,
155 'title' => ts('Participant Status Label'),
156 'description' => ts('localized label for display of this status type'),
158 'size' => CRM_Utils_Type
::HUGE
,
159 'where' => 'civicrm_participant_status_type.label',
160 'table_name' => 'civicrm_participant_status_type',
161 'entity' => 'ParticipantStatusType',
162 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
168 'type' => CRM_Utils_Type
::T_STRING
,
169 'title' => ts('Participant Status Class'),
170 'description' => ts('the general group of status type this one belongs to'),
172 'size' => CRM_Utils_Type
::EIGHT
,
173 'where' => 'civicrm_participant_status_type.class',
174 'table_name' => 'civicrm_participant_status_type',
175 'entity' => 'ParticipantStatusType',
176 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
181 'pseudoconstant' => [
182 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
187 'name' => 'is_reserved',
188 'type' => CRM_Utils_Type
::T_BOOLEAN
,
189 'title' => ts('Participant Status Is Reserved?>'),
190 'description' => ts('whether this is a status type required by the system'),
191 'where' => 'civicrm_participant_status_type.is_reserved',
192 'table_name' => 'civicrm_participant_status_type',
193 'entity' => 'ParticipantStatusType',
194 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
199 'name' => 'is_active',
200 'type' => CRM_Utils_Type
::T_BOOLEAN
,
201 'title' => ts('Participant Status is Active'),
202 'description' => ts('whether this status type is active'),
203 'where' => 'civicrm_participant_status_type.is_active',
205 'table_name' => 'civicrm_participant_status_type',
206 'entity' => 'ParticipantStatusType',
207 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
212 'name' => 'is_counted',
213 'type' => CRM_Utils_Type
::T_BOOLEAN
,
214 'title' => ts('Participant Status Counts?'),
215 'description' => ts('whether this status type is counted against event size limit'),
216 'where' => 'civicrm_participant_status_type.is_counted',
217 'table_name' => 'civicrm_participant_status_type',
218 'entity' => 'ParticipantStatusType',
219 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
225 'type' => CRM_Utils_Type
::T_INT
,
226 'title' => ts('Order'),
227 'description' => ts('controls sort order'),
229 'where' => 'civicrm_participant_status_type.weight',
230 'table_name' => 'civicrm_participant_status_type',
231 'entity' => 'ParticipantStatusType',
232 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
237 'name' => 'visibility_id',
238 'type' => CRM_Utils_Type
::T_INT
,
239 'title' => ts('Participant Status Visibility'),
240 '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'),
241 'where' => 'civicrm_participant_status_type.visibility_id',
242 'table_name' => 'civicrm_participant_status_type',
243 'entity' => 'ParticipantStatusType',
244 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
249 'pseudoconstant' => [
250 'optionGroupName' => 'visibility',
251 'optionEditPath' => 'civicrm/admin/options/visibility',
256 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
258 return Civi
::$statics[__CLASS__
]['fields'];
262 * Return a mapping from field-name to the corresponding key (as used in fields()).
265 * Array(string $name => string $uniqueName).
267 public static function &fieldKeys() {
268 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
269 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
271 return Civi
::$statics[__CLASS__
]['fieldKeys'];
275 * Returns the names of this table
279 public static function getTableName() {
280 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
284 * Returns if this table needs to be logged
288 public function getLog() {
293 * Returns the list of fields that can be imported
295 * @param bool $prefix
299 public static function &import($prefix = FALSE) {
300 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
305 * Returns the list of fields that can be exported
307 * @param bool $prefix
311 public static function &export($prefix = FALSE) {
312 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
317 * Returns the list of indices
319 * @param bool $localize
323 public static function indices($localize = TRUE) {
325 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;