CRM-20312 regenerated DAO with localisation
[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
6a7e5e5d 33 * (GenCodeChecksum:614f4f6813728d18eb5ccd003c6d3d33)
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',
6a7e5e5d 131 'localizable' => 0,
e501603b
TO
132 ) ,
133 'participant_status' => array(
134 'name' => 'name',
135 'type' => CRM_Utils_Type::T_STRING,
136 'title' => ts('Participant Status') ,
137 'description' => 'non-localized name of the status type',
138 'maxlength' => 64,
139 'size' => CRM_Utils_Type::BIG,
140 'import' => true,
141 'where' => 'civicrm_participant_status_type.name',
142 'headerPattern' => '',
143 'dataPattern' => '',
144 'export' => true,
522a26c9 145 'table_name' => 'civicrm_participant_status_type',
146 'entity' => 'ParticipantStatusType',
147 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 148 'localizable' => 0,
e501603b
TO
149 ) ,
150 'label' => array(
151 'name' => 'label',
152 'type' => CRM_Utils_Type::T_STRING,
153 'title' => ts('Participant Status Label') ,
154 'description' => 'localized label for display of this status type',
155 'maxlength' => 255,
156 'size' => CRM_Utils_Type::HUGE,
522a26c9 157 'table_name' => 'civicrm_participant_status_type',
158 'entity' => 'ParticipantStatusType',
159 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 160 'localizable' => 1,
e501603b
TO
161 ) ,
162 'class' => array(
163 'name' => 'class',
164 'type' => CRM_Utils_Type::T_STRING,
165 'title' => ts('Participant Status Class') ,
166 'description' => 'the general group of status type this one belongs to',
167 'maxlength' => 8,
168 'size' => CRM_Utils_Type::EIGHT,
522a26c9 169 'table_name' => 'civicrm_participant_status_type',
170 'entity' => 'ParticipantStatusType',
171 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 172 'localizable' => 0,
e501603b
TO
173 'html' => array(
174 'type' => 'Select',
175 ) ,
176 'pseudoconstant' => array(
177 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
178 )
179 ) ,
180 'is_reserved' => array(
181 'name' => 'is_reserved',
182 'type' => CRM_Utils_Type::T_BOOLEAN,
183 'title' => ts('Participant Status Is Reserved?>') ,
184 'description' => 'whether this is a status type required by the system',
522a26c9 185 'table_name' => 'civicrm_participant_status_type',
186 'entity' => 'ParticipantStatusType',
187 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 188 'localizable' => 0,
e501603b
TO
189 ) ,
190 'is_active' => array(
191 'name' => 'is_active',
192 'type' => CRM_Utils_Type::T_BOOLEAN,
193 'title' => ts('Participant Status is Active') ,
194 'description' => 'whether this status type is active',
195 'default' => '1',
522a26c9 196 'table_name' => 'civicrm_participant_status_type',
197 'entity' => 'ParticipantStatusType',
198 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 199 'localizable' => 0,
e501603b
TO
200 ) ,
201 'is_counted' => array(
202 'name' => 'is_counted',
203 'type' => CRM_Utils_Type::T_BOOLEAN,
204 'title' => ts('Participant Status Counts?') ,
205 'description' => 'whether this status type is counted against event size limit',
522a26c9 206 'table_name' => 'civicrm_participant_status_type',
207 'entity' => 'ParticipantStatusType',
208 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 209 'localizable' => 0,
e501603b
TO
210 ) ,
211 'weight' => array(
212 'name' => 'weight',
213 'type' => CRM_Utils_Type::T_INT,
214 'title' => ts('Order') ,
215 'description' => 'controls sort order',
216 'required' => true,
522a26c9 217 'table_name' => 'civicrm_participant_status_type',
218 'entity' => 'ParticipantStatusType',
219 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 220 'localizable' => 0,
e501603b
TO
221 ) ,
222 'visibility_id' => array(
223 'name' => 'visibility_id',
224 'type' => CRM_Utils_Type::T_INT,
225 'title' => ts('Participant Status Visibility') ,
226 '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 227 'table_name' => 'civicrm_participant_status_type',
228 'entity' => 'ParticipantStatusType',
229 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
6a7e5e5d 230 'localizable' => 0,
e501603b
TO
231 'html' => array(
232 'type' => 'Select',
233 ) ,
234 'pseudoconstant' => array(
235 'optionGroupName' => 'visibility',
236 'optionEditPath' => 'civicrm/admin/options/visibility',
237 )
238 ) ,
239 );
346aaaba 240 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 241 }
346aaaba 242 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
243 }
244 /**
bd8e0b14 245 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
246 *
247 * @return array
bd8e0b14 248 * Array(string $name => string $uniqueName).
e501603b
TO
249 */
250 static function &fieldKeys() {
bd8e0b14
TO
251 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
252 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 253 }
bd8e0b14 254 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
255 }
256 /**
257 * Returns the names of this table
258 *
259 * @return string
260 */
261 static function getTableName() {
262 return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
263 }
264 /**
265 * Returns if this table needs to be logged
266 *
267 * @return boolean
268 */
269 function getLog() {
270 return self::$_log;
271 }
272 /**
273 * Returns the list of fields that can be imported
274 *
275 * @param bool $prefix
276 *
277 * @return array
278 */
279 static function &import($prefix = false) {
60808919
TO
280 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant_status_type', $prefix, array());
281 return $r;
e501603b
TO
282 }
283 /**
284 * Returns the list of fields that can be exported
285 *
286 * @param bool $prefix
287 *
288 * @return array
289 */
290 static function &export($prefix = false) {
60808919
TO
291 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant_status_type', $prefix, array());
292 return $r;
e501603b
TO
293 }
294}