3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:614f4f6813728d18eb5ccd003c6d3d33)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Event_DAO_ParticipantStatusType constructor.
40 class CRM_Event_DAO_ParticipantStatusType
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_participant_status_type';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
54 * unique participant status type id
60 * non-localized name of the status type
66 * localized label for display of this status type
72 * the general group of status type this one belongs to
78 * whether this is a status type required by the system
84 * whether this status type is active
90 * whether this status type is counted against event size limit
102 * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
106 public $visibility_id;
110 function __construct() {
111 $this->__table
= 'civicrm_participant_status_type';
112 parent
::__construct();
115 * Returns all the column names of this table
119 static function &fields() {
120 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
121 Civi
::$statics[__CLASS__
]['fields'] = array(
124 'type' => CRM_Utils_Type
::T_INT
,
125 'title' => ts('Participant Status Type ID') ,
126 'description' => 'unique participant status type id',
128 'table_name' => 'civicrm_participant_status_type',
129 'entity' => 'ParticipantStatusType',
130 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
133 'participant_status' => array(
135 'type' => CRM_Utils_Type
::T_STRING
,
136 'title' => ts('Participant Status') ,
137 'description' => 'non-localized name of the status type',
139 'size' => CRM_Utils_Type
::BIG
,
141 'where' => 'civicrm_participant_status_type.name',
142 'headerPattern' => '',
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 Label') ,
154 'description' => 'localized label for display of this status type',
156 'size' => CRM_Utils_Type
::HUGE
,
157 'table_name' => 'civicrm_participant_status_type',
158 'entity' => 'ParticipantStatusType',
159 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
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',
168 'size' => CRM_Utils_Type
::EIGHT
,
169 'table_name' => 'civicrm_participant_status_type',
170 'entity' => 'ParticipantStatusType',
171 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
176 'pseudoconstant' => array(
177 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
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',
185 'table_name' => 'civicrm_participant_status_type',
186 'entity' => 'ParticipantStatusType',
187 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
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',
196 'table_name' => 'civicrm_participant_status_type',
197 'entity' => 'ParticipantStatusType',
198 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
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',
206 'table_name' => 'civicrm_participant_status_type',
207 'entity' => 'ParticipantStatusType',
208 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
213 'type' => CRM_Utils_Type
::T_INT
,
214 'title' => ts('Order') ,
215 'description' => 'controls sort order',
217 'table_name' => 'civicrm_participant_status_type',
218 'entity' => 'ParticipantStatusType',
219 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
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',
227 'table_name' => 'civicrm_participant_status_type',
228 'entity' => 'ParticipantStatusType',
229 'bao' => 'CRM_Event_BAO_ParticipantStatusType',
234 'pseudoconstant' => array(
235 'optionGroupName' => 'visibility',
236 'optionEditPath' => 'civicrm/admin/options/visibility',
240 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
242 return Civi
::$statics[__CLASS__
]['fields'];
245 * Return a mapping from field-name to the corresponding key (as used in fields()).
248 * Array(string $name => string $uniqueName).
250 static function &fieldKeys() {
251 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
252 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
254 return Civi
::$statics[__CLASS__
]['fieldKeys'];
257 * Returns the names of this table
261 static function getTableName() {
262 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
265 * Returns if this table needs to be logged
273 * Returns the list of fields that can be imported
275 * @param bool $prefix
279 static function &import($prefix = false) {
280 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'participant_status_type', $prefix, array());
284 * Returns the list of fields that can be exported
286 * @param bool $prefix
290 static function &export($prefix = false) {
291 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'participant_status_type', $prefix, array());
295 * Returns the list of indices
297 public static function indices($localize = TRUE) {
299 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;