5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:614f4f6813728d18eb5ccd003c6d3d33)
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 static $_tableName = 'civicrm_participant_status_type';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 all the column names of this table
107 public static function &fields() {
108 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
109 Civi
::$statics[__CLASS__
]['fields'] = [
112 'type' => CRM_Utils_Type
::T_INT
,
113 'title' => ts('Participant Status Type ID'),
114 'description' => 'unique participant status type id',
116 'table_name' => 'civicrm_participant_status_type',
117 'entity' => 'ParticipantStatusType',
118 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
121 'participant_status' => [
123 'type' => CRM_Utils_Type
::T_STRING
,
124 'title' => ts('Participant Status'),
125 'description' => 'non-localized name of the status type',
127 'size' => CRM_Utils_Type
::BIG
,
129 'where' => 'civicrm_participant_status_type.name',
130 'headerPattern' => '',
133 'table_name' => 'civicrm_participant_status_type',
134 'entity' => 'ParticipantStatusType',
135 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
140 'type' => CRM_Utils_Type
::T_STRING
,
141 'title' => ts('Participant Status Label'),
142 'description' => 'localized label for display of this status type',
144 'size' => CRM_Utils_Type
::HUGE
,
145 'table_name' => 'civicrm_participant_status_type',
146 'entity' => 'ParticipantStatusType',
147 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
152 'type' => CRM_Utils_Type
::T_STRING
,
153 'title' => ts('Participant Status Class'),
154 'description' => 'the general group of status type this one belongs to',
156 'size' => CRM_Utils_Type
::EIGHT
,
157 'table_name' => 'civicrm_participant_status_type',
158 'entity' => 'ParticipantStatusType',
159 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
164 'pseudoconstant' => [
165 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
169 'name' => 'is_reserved',
170 'type' => CRM_Utils_Type
::T_BOOLEAN
,
171 'title' => ts('Participant Status Is Reserved?>'),
172 'description' => 'whether this is a status type required by the system',
173 'table_name' => 'civicrm_participant_status_type',
174 'entity' => 'ParticipantStatusType',
175 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
179 'name' => 'is_active',
180 'type' => CRM_Utils_Type
::T_BOOLEAN
,
181 'title' => ts('Participant Status is Active'),
182 'description' => 'whether this status type is active',
184 'table_name' => 'civicrm_participant_status_type',
185 'entity' => 'ParticipantStatusType',
186 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
190 'name' => 'is_counted',
191 'type' => CRM_Utils_Type
::T_BOOLEAN
,
192 'title' => ts('Participant Status Counts?'),
193 'description' => 'whether this status type is counted against event size limit',
194 'table_name' => 'civicrm_participant_status_type',
195 'entity' => 'ParticipantStatusType',
196 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
201 'type' => CRM_Utils_Type
::T_INT
,
202 'title' => ts('Order'),
203 'description' => 'controls sort order',
205 'table_name' => 'civicrm_participant_status_type',
206 'entity' => 'ParticipantStatusType',
207 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
211 'name' => 'visibility_id',
212 'type' => CRM_Utils_Type
::T_INT
,
213 'title' => ts('Participant Status Visibility'),
214 'description' => 'whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group',
215 'table_name' => 'civicrm_participant_status_type',
216 'entity' => 'ParticipantStatusType',
217 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
222 'pseudoconstant' => [
223 'optionGroupName' => 'visibility',
224 'optionEditPath' => 'civicrm/admin/options/visibility',
228 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
230 return Civi
::$statics[__CLASS__
]['fields'];
234 * Return a mapping from field-name to the corresponding key (as used in fields()).
237 * Array(string $name => string $uniqueName).
239 public static function &fieldKeys() {
240 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
241 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
243 return Civi
::$statics[__CLASS__
]['fieldKeys'];
247 * Returns the names of this table
251 public static function getTableName() {
252 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
256 * Returns if this table needs to be logged
260 public function getLog() {
265 * Returns the list of fields that can be imported
267 * @param bool $prefix
271 public static function &import($prefix = FALSE) {
272 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
277 * Returns the list of fields that can be exported
279 * @param bool $prefix
283 public static function &export($prefix = FALSE) {
284 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
289 * Returns the list of indices
291 * @param bool $localize
295 public static function indices($localize = TRUE) {
297 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;