Regen DAOs with new import() / export()
[civicrm-core.git] / CRM / Event / DAO / ParticipantStatusType.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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
29 * @copyright CiviCRM LLC (c) 2004-2016
30 *
31 * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:c129b855ca83f4e0e659f57936b92799)
34 */
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO {
38 /**
39 * static instance to hold the table name
40 *
41 * @var string
42 */
43 static $_tableName = 'civicrm_participant_status_type';
44 /**
45 * static instance to hold the field values
46 *
47 * @var array
48 */
49 static $_fields = null;
50 /**
51 * static instance to hold the keys used in $_fields for each field.
52 *
53 * @var array
54 */
55 static $_fieldKeys = null;
56 /**
57 * static instance to hold the FK relationships
58 *
59 * @var string
60 */
61 static $_links = null;
62 /**
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
65 *
66 * @var boolean
67 */
68 static $_log = true;
69 /**
70 * unique participant status type id
71 *
72 * @var int unsigned
73 */
74 public $id;
75 /**
76 * non-localized name of the status type
77 *
78 * @var string
79 */
80 public $name;
81 /**
82 * localized label for display of this status type
83 *
84 * @var string
85 */
86 public $label;
87 /**
88 * the general group of status type this one belongs to
89 *
90 * @var string
91 */
92 public $class;
93 /**
94 * whether this is a status type required by the system
95 *
96 * @var boolean
97 */
98 public $is_reserved;
99 /**
100 * whether this status type is active
101 *
102 * @var boolean
103 */
104 public $is_active;
105 /**
106 * whether this status type is counted against event size limit
107 *
108 * @var boolean
109 */
110 public $is_counted;
111 /**
112 * controls sort order
113 *
114 * @var int unsigned
115 */
116 public $weight;
117 /**
118 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
119 *
120 * @var int unsigned
121 */
122 public $visibility_id;
123 /**
124 * class constructor
125 *
126 * @return civicrm_participant_status_type
127 */
128 function __construct() {
129 $this->__table = 'civicrm_participant_status_type';
130 parent::__construct();
131 }
132 /**
133 * Returns all the column names of this table
134 *
135 * @return array
136 */
137 static function &fields() {
138 if (!(self::$_fields)) {
139 self::$_fields = array(
140 'id' => array(
141 'name' => 'id',
142 'type' => CRM_Utils_Type::T_INT,
143 'title' => ts('Participant Status Type ID') ,
144 'description' => 'unique participant status type id',
145 'required' => true,
146 ) ,
147 'participant_status' => array(
148 'name' => 'name',
149 'type' => CRM_Utils_Type::T_STRING,
150 'title' => ts('Participant Status') ,
151 'description' => 'non-localized name of the status type',
152 'maxlength' => 64,
153 'size' => CRM_Utils_Type::BIG,
154 'import' => true,
155 'where' => 'civicrm_participant_status_type.name',
156 'headerPattern' => '',
157 'dataPattern' => '',
158 'export' => true,
159 ) ,
160 'label' => array(
161 'name' => 'label',
162 'type' => CRM_Utils_Type::T_STRING,
163 'title' => ts('Participant Status Label') ,
164 'description' => 'localized label for display of this status type',
165 'maxlength' => 255,
166 'size' => CRM_Utils_Type::HUGE,
167 ) ,
168 'class' => array(
169 'name' => 'class',
170 'type' => CRM_Utils_Type::T_STRING,
171 'title' => ts('Participant Status Class') ,
172 'description' => 'the general group of status type this one belongs to',
173 'maxlength' => 8,
174 'size' => CRM_Utils_Type::EIGHT,
175 'html' => array(
176 'type' => 'Select',
177 ) ,
178 'pseudoconstant' => array(
179 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
180 )
181 ) ,
182 'is_reserved' => array(
183 'name' => 'is_reserved',
184 'type' => CRM_Utils_Type::T_BOOLEAN,
185 'title' => ts('Participant Status Is Reserved?>') ,
186 'description' => 'whether this is a status type required by the system',
187 ) ,
188 'is_active' => array(
189 'name' => 'is_active',
190 'type' => CRM_Utils_Type::T_BOOLEAN,
191 'title' => ts('Participant Status is Active') ,
192 'description' => 'whether this status type is active',
193 'default' => '1',
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',
200 ) ,
201 'weight' => array(
202 'name' => 'weight',
203 'type' => CRM_Utils_Type::T_INT,
204 'title' => ts('Order') ,
205 'description' => 'controls sort order',
206 'required' => true,
207 ) ,
208 'visibility_id' => array(
209 'name' => 'visibility_id',
210 'type' => CRM_Utils_Type::T_INT,
211 'title' => ts('Participant Status Visibility') ,
212 'description' => 'whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group',
213 'html' => array(
214 'type' => 'Select',
215 ) ,
216 'pseudoconstant' => array(
217 'optionGroupName' => 'visibility',
218 'optionEditPath' => 'civicrm/admin/options/visibility',
219 )
220 ) ,
221 );
222 }
223 return self::$_fields;
224 }
225 /**
226 * Returns an array containing, for each field, the arary key used for that
227 * field in self::$_fields.
228 *
229 * @return array
230 */
231 static function &fieldKeys() {
232 if (!(self::$_fieldKeys)) {
233 self::$_fieldKeys = array(
234 'id' => 'id',
235 'name' => 'participant_status',
236 'label' => 'label',
237 'class' => 'class',
238 'is_reserved' => 'is_reserved',
239 'is_active' => 'is_active',
240 'is_counted' => 'is_counted',
241 'weight' => 'weight',
242 'visibility_id' => 'visibility_id',
243 );
244 }
245 return self::$_fieldKeys;
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) {
271 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'participant_status_type', $prefix, array());
272 return $r;
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) {
282 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'participant_status_type', $prefix, array());
283 return $r;
284 }
285 }