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:ed0f2b22eb6983f73fa5b87fc4fa7c9c)
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
37 * @var int|string|null
38 * (SQL type: int unsigned)
39 * Note that values will be retrieved from the database as a string.
44 * non-localized name of the status type
47 * (SQL type: varchar(64))
48 * Note that values will be retrieved from the database as a string.
53 * localized label for display of this status type
56 * (SQL type: varchar(255))
57 * Note that values will be retrieved from the database as a string.
62 * the general group of status type this one belongs to
65 * (SQL type: varchar(8))
66 * Note that values will be retrieved from the database as a string.
71 * whether this is a status type required by the system
75 * Note that values will be retrieved from the database as a string.
80 * whether this status type is active
84 * Note that values will be retrieved from the database as a string.
89 * whether this status type is counted against event size limit
93 * Note that values will be retrieved from the database as a string.
101 * (SQL type: int unsigned)
102 * Note that values will be retrieved from the database as a string.
107 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
109 * @var int|string|null
110 * (SQL type: int unsigned)
111 * Note that values will be retrieved from the database as a string.
113 public $visibility_id;
118 public function __construct() {
119 $this->__table
= 'civicrm_participant_status_type';
120 parent
::__construct();
124 * Returns localized title of this entity.
126 * @param bool $plural
127 * Whether to return the plural version of the title.
129 public static function getEntityTitle($plural = FALSE) {
130 return $plural ?
ts('Participant Status Types') : ts('Participant Status Type');
134 * Returns all the column names of this table
138 public static function &fields() {
139 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
140 Civi
::$statics[__CLASS__
]['fields'] = [
143 'type' => CRM_Utils_Type
::T_INT
,
144 'title' => ts('Participant Status Type ID'),
145 'description' => ts('unique participant status type id'),
147 'where' => 'civicrm_participant_status_type.id',
148 'table_name' => 'civicrm_participant_status_type',
149 'entity' => 'ParticipantStatusType',
150 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
158 'participant_status' => [
160 'type' => CRM_Utils_Type
::T_STRING
,
161 'title' => ts('Participant Status'),
162 'description' => ts('non-localized name of the status type'),
164 'size' => CRM_Utils_Type
::BIG
,
166 'where' => 'civicrm_participant_status_type.name',
168 'table_name' => 'civicrm_participant_status_type',
169 'entity' => 'ParticipantStatusType',
170 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
176 'type' => CRM_Utils_Type
::T_STRING
,
177 'title' => ts('Participant Status Label'),
178 'description' => ts('localized label for display of this status type'),
180 'size' => CRM_Utils_Type
::HUGE
,
181 'where' => 'civicrm_participant_status_type.label',
182 'table_name' => 'civicrm_participant_status_type',
183 'entity' => 'ParticipantStatusType',
184 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
190 'type' => CRM_Utils_Type
::T_STRING
,
191 'title' => ts('Participant Status Class'),
192 'description' => ts('the general group of status type this one belongs to'),
194 'size' => CRM_Utils_Type
::EIGHT
,
195 'where' => 'civicrm_participant_status_type.class',
196 'table_name' => 'civicrm_participant_status_type',
197 'entity' => 'ParticipantStatusType',
198 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
203 'pseudoconstant' => [
204 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
209 'name' => 'is_reserved',
210 'type' => CRM_Utils_Type
::T_BOOLEAN
,
211 'title' => ts('Participant Status Is Reserved?>'),
212 'description' => ts('whether this is a status type required by the system'),
214 'where' => 'civicrm_participant_status_type.is_reserved',
216 'table_name' => 'civicrm_participant_status_type',
217 'entity' => 'ParticipantStatusType',
218 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
223 'name' => 'is_active',
224 'type' => CRM_Utils_Type
::T_BOOLEAN
,
225 'title' => ts('Participant Status is Active'),
226 'description' => ts('whether this status type is active'),
228 'where' => 'civicrm_participant_status_type.is_active',
230 'table_name' => 'civicrm_participant_status_type',
231 'entity' => 'ParticipantStatusType',
232 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
237 'name' => 'is_counted',
238 'type' => CRM_Utils_Type
::T_BOOLEAN
,
239 'title' => ts('Participant Status Counts?'),
240 'description' => ts('whether this status type is counted against event size limit'),
242 'where' => 'civicrm_participant_status_type.is_counted',
244 'table_name' => 'civicrm_participant_status_type',
245 'entity' => 'ParticipantStatusType',
246 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
252 'type' => CRM_Utils_Type
::T_INT
,
253 'title' => ts('Order'),
254 'description' => ts('controls sort order'),
256 'where' => 'civicrm_participant_status_type.weight',
257 'table_name' => 'civicrm_participant_status_type',
258 'entity' => 'ParticipantStatusType',
259 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
264 'name' => 'visibility_id',
265 'type' => CRM_Utils_Type
::T_INT
,
266 'title' => ts('Participant Status Visibility'),
267 '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'),
268 'where' => 'civicrm_participant_status_type.visibility_id',
269 'table_name' => 'civicrm_participant_status_type',
270 'entity' => 'ParticipantStatusType',
271 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
276 'pseudoconstant' => [
277 'optionGroupName' => 'visibility',
278 'optionEditPath' => 'civicrm/admin/options/visibility',
283 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
285 return Civi
::$statics[__CLASS__
]['fields'];
289 * Return a mapping from field-name to the corresponding key (as used in fields()).
292 * Array(string $name => string $uniqueName).
294 public static function &fieldKeys() {
295 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
296 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
298 return Civi
::$statics[__CLASS__
]['fieldKeys'];
302 * Returns the names of this table
306 public static function getTableName() {
307 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
311 * Returns if this table needs to be logged
315 public function getLog() {
320 * Returns the list of fields that can be imported
322 * @param bool $prefix
326 public static function &import($prefix = FALSE) {
327 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, []);
332 * Returns the list of fields that can be exported
334 * @param bool $prefix
338 public static function &export($prefix = FALSE) {
339 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, []);
344 * Returns the list of indices
346 * @param bool $localize
350 public static function indices($localize = TRUE) {
352 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;