Merge pull request #9616 from ErichBSchulz/feature/drupal_boot_no_exit
[civicrm-core.git] / CRM / Event / DAO / ParticipantStatusType.php
CommitLineData
e501603b
TO
1<?php
2/*
3+--------------------------------------------------------------------+
4| CiviCRM version 4.7 |
5+--------------------------------------------------------------------+
0f03f337 6| Copyright CiviCRM LLC (c) 2004-2017 |
e501603b
TO
7+--------------------------------------------------------------------+
8| This file is a part of CiviCRM. |
9| |
10| CiviCRM is free software; you can copy, modify, and distribute it |
11| under the terms of the GNU Affero General Public License |
12| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13| |
14| CiviCRM is distributed in the hope that it will be useful, but |
15| WITHOUT ANY WARRANTY; without even the implied warranty of |
16| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17| See the GNU Affero General Public License for more details. |
18| |
19| You should have received a copy of the GNU Affero General Public |
20| License and the CiviCRM Licensing Exception along |
21| with this program; if not, contact CiviCRM LLC |
22| at info[AT]civicrm[DOT]org. If you have questions about the |
23| GNU Affero General Public License or the licensing of CiviCRM, |
24| see the CiviCRM license FAQ at http://civicrm.org/licensing |
25+--------------------------------------------------------------------+
26*/
27/**
28 * @package CRM
0f03f337 29 * @copyright CiviCRM LLC (c) 2004-2017
e501603b
TO
30 *
31 * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
022785d8 33 * (GenCodeChecksum:ee7ee3c21fbd68e35d4249da6136c4ef)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
f41f0342 37/**
38 * CRM_Event_DAO_ParticipantStatusType constructor.
39 */
e501603b
TO
40class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO {
41 /**
f41f0342 42 * Static instance to hold the table name.
e501603b
TO
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_participant_status_type';
e501603b 47 /**
f41f0342 48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b
TO
49 *
50 * @var boolean
51 */
52 static $_log = true;
53 /**
54 * unique participant status type id
55 *
56 * @var int unsigned
57 */
58 public $id;
59 /**
60 * non-localized name of the status type
61 *
62 * @var string
63 */
64 public $name;
65 /**
66 * localized label for display of this status type
67 *
68 * @var string
69 */
70 public $label;
71 /**
72 * the general group of status type this one belongs to
73 *
74 * @var string
75 */
76 public $class;
77 /**
78 * whether this is a status type required by the system
79 *
80 * @var boolean
81 */
82 public $is_reserved;
83 /**
84 * whether this status type is active
85 *
86 * @var boolean
87 */
88 public $is_active;
89 /**
90 * whether this status type is counted against event size limit
91 *
92 * @var boolean
93 */
94 public $is_counted;
95 /**
96 * controls sort order
97 *
98 * @var int unsigned
99 */
100 public $weight;
101 /**
102 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
103 *
104 * @var int unsigned
105 */
106 public $visibility_id;
107 /**
f41f0342 108 * Class constructor.
e501603b
TO
109 */
110 function __construct() {
111 $this->__table = 'civicrm_participant_status_type';
112 parent::__construct();
113 }
114 /**
115 * Returns all the column names of this table
116 *
117 * @return array
118 */
119 static function &fields() {
346aaaba
TO
120 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
121 Civi::$statics[__CLASS__]['fields'] = array(
e501603b
TO
122 'id' => array(
123 'name' => 'id',
124 'type' => CRM_Utils_Type::T_INT,
125 'title' => ts('Participant Status Type ID') ,
126 'description' => 'unique participant status type id',
127 'required' => true,
522a26c9 128 'table_name' => 'civicrm_participant_status_type',
129 'entity' => 'ParticipantStatusType',
130 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
131 ) ,
132 'participant_status' => array(
133 'name' => 'name',
134 'type' => CRM_Utils_Type::T_STRING,
135 'title' => ts('Participant Status') ,
136 'description' => 'non-localized name of the status type',
137 'maxlength' => 64,
138 'size' => CRM_Utils_Type::BIG,
139 'import' => true,
140 'where' => 'civicrm_participant_status_type.name',
141 'headerPattern' => '',
142 'dataPattern' => '',
143 'export' => true,
522a26c9 144 'table_name' => 'civicrm_participant_status_type',
145 'entity' => 'ParticipantStatusType',
146 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
147 ) ,
148 'label' => array(
149 'name' => 'label',
150 'type' => CRM_Utils_Type::T_STRING,
151 'title' => ts('Participant Status Label') ,
152 'description' => 'localized label for display of this status type',
153 'maxlength' => 255,
154 'size' => CRM_Utils_Type::HUGE,
522a26c9 155 'table_name' => 'civicrm_participant_status_type',
156 'entity' => 'ParticipantStatusType',
157 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
158 ) ,
159 'class' => array(
160 'name' => 'class',
161 'type' => CRM_Utils_Type::T_STRING,
162 'title' => ts('Participant Status Class') ,
163 'description' => 'the general group of status type this one belongs to',
164 'maxlength' => 8,
165 'size' => CRM_Utils_Type::EIGHT,
522a26c9 166 'table_name' => 'civicrm_participant_status_type',
167 'entity' => 'ParticipantStatusType',
168 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
169 'html' => array(
170 'type' => 'Select',
171 ) ,
172 'pseudoconstant' => array(
173 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
174 )
175 ) ,
176 'is_reserved' => array(
177 'name' => 'is_reserved',
178 'type' => CRM_Utils_Type::T_BOOLEAN,
179 'title' => ts('Participant Status Is Reserved?>') ,
180 'description' => 'whether this is a status type required by the system',
522a26c9 181 'table_name' => 'civicrm_participant_status_type',
182 'entity' => 'ParticipantStatusType',
183 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
184 ) ,
185 'is_active' => array(
186 'name' => 'is_active',
187 'type' => CRM_Utils_Type::T_BOOLEAN,
188 'title' => ts('Participant Status is Active') ,
189 'description' => 'whether this status type is active',
190 'default' => '1',
522a26c9 191 'table_name' => 'civicrm_participant_status_type',
192 'entity' => 'ParticipantStatusType',
193 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
194 ) ,
195 'is_counted' => array(
196 'name' => 'is_counted',
197 'type' => CRM_Utils_Type::T_BOOLEAN,
198 'title' => ts('Participant Status Counts?') ,
199 'description' => 'whether this status type is counted against event size limit',
522a26c9 200 'table_name' => 'civicrm_participant_status_type',
201 'entity' => 'ParticipantStatusType',
202 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
203 ) ,
204 'weight' => array(
205 'name' => 'weight',
206 'type' => CRM_Utils_Type::T_INT,
207 'title' => ts('Order') ,
208 'description' => 'controls sort order',
209 'required' => true,
522a26c9 210 'table_name' => 'civicrm_participant_status_type',
211 'entity' => 'ParticipantStatusType',
212 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
213 ) ,
214 'visibility_id' => array(
215 'name' => 'visibility_id',
216 'type' => CRM_Utils_Type::T_INT,
217 'title' => ts('Participant Status Visibility') ,
218 'description' => 'whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group',
522a26c9 219 'table_name' => 'civicrm_participant_status_type',
220 'entity' => 'ParticipantStatusType',
221 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
e501603b
TO
222 'html' => array(
223 'type' => 'Select',
224 ) ,
225 'pseudoconstant' => array(
226 'optionGroupName' => 'visibility',
227 'optionEditPath' => 'civicrm/admin/options/visibility',
228 )
229 ) ,
230 );
346aaaba 231 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 232 }
346aaaba 233 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
234 }
235 /**
bd8e0b14 236 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
237 *
238 * @return array
bd8e0b14 239 * Array(string $name => string $uniqueName).
e501603b
TO
240 */
241 static function &fieldKeys() {
bd8e0b14
TO
242 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
243 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 244 }
bd8e0b14 245 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
246 }
247 /**
248 * Returns the names of this table
249 *
250 * @return string
251 */
252 static function getTableName() {
253 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
254 }
255 /**
256 * Returns if this table needs to be logged
257 *
258 * @return boolean
259 */
260 function getLog() {
261 return self::$_log;
262 }
263 /**
264 * Returns the list of fields that can be imported
265 *
266 * @param bool $prefix
267 *
268 * @return array
269 */
270 static function &import($prefix = false) {
60808919
TO
271 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant_status_type', $prefix, array());
272 return $r;
e501603b
TO
273 }
274 /**
275 * Returns the list of fields that can be exported
276 *
277 * @param bool $prefix
278 *
279 * @return array
280 */
281 static function &export($prefix = false) {
60808919
TO
282 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant_status_type', $prefix, array());
283 return $r;
e501603b
TO
284 }
285}