3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Member/MembershipStatus.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:386d3a47b6acc84c75655d3682cc1403)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Member_DAO_MembershipStatus
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_membership_status';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
76 * Name for Membership Status
82 * Label for Membership Status
88 * Event when this status starts.
94 * Unit used for adjusting from start_event.
98 public $start_event_adjust_unit;
100 * Status range begins this many units from start_event.
104 public $start_event_adjust_interval;
106 * Event after which this status ends.
112 * Unit used for adjusting from the ending event.
116 public $end_event_adjust_unit;
118 * Status range ends this many units from end_event.
122 public $end_event_adjust_interval;
124 * Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).
128 public $is_current_member;
130 * Is this status for admin/manual assignment only.
141 * Assign this status to a membership record if no other status match is found.
147 * Is this membership_status enabled.
153 * Is this membership_status reserved.
161 * @return civicrm_membership_status
163 function __construct() {
164 $this->__table
= 'civicrm_membership_status';
165 parent
::__construct();
168 * Returns all the column names of this table
172 static function &fields() {
173 if (!(self
::$_fields)) {
174 self
::$_fields = array(
177 'type' => CRM_Utils_Type
::T_INT
,
178 'title' => ts('Membership Status ID') ,
179 'description' => 'Membership Id',
182 'membership_status' => array(
184 'type' => CRM_Utils_Type
::T_STRING
,
185 'title' => ts('Membership Status') ,
186 'description' => 'Name for Membership Status',
188 'size' => CRM_Utils_Type
::HUGE
,
190 'where' => 'civicrm_membership_status.name',
191 'headerPattern' => '',
197 'type' => CRM_Utils_Type
::T_STRING
,
198 'title' => ts('Label') ,
199 'description' => 'Label for Membership Status',
201 'size' => CRM_Utils_Type
::HUGE
,
203 'start_event' => array(
204 'name' => 'start_event',
205 'type' => CRM_Utils_Type
::T_STRING
,
206 'title' => ts('Start Event') ,
207 'description' => 'Event when this status starts.',
209 'size' => CRM_Utils_Type
::TWELVE
,
213 'pseudoconstant' => array(
214 'callback' => 'CRM_Core_SelectValues::eventDate',
217 'start_event_adjust_unit' => array(
218 'name' => 'start_event_adjust_unit',
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('Start Event Adjust Unit') ,
221 'description' => 'Unit used for adjusting from start_event.',
223 'size' => CRM_Utils_Type
::EIGHT
,
227 'pseudoconstant' => array(
228 'callback' => 'CRM_Core_SelectValues::unitList',
231 'start_event_adjust_interval' => array(
232 'name' => 'start_event_adjust_interval',
233 'type' => CRM_Utils_Type
::T_INT
,
234 'title' => ts('Start Event Adjust Interval') ,
235 'description' => 'Status range begins this many units from start_event.',
237 'end_event' => array(
238 'name' => 'end_event',
239 'type' => CRM_Utils_Type
::T_STRING
,
240 'title' => ts('End Event') ,
241 'description' => 'Event after which this status ends.',
243 'size' => CRM_Utils_Type
::TWELVE
,
247 'pseudoconstant' => array(
248 'callback' => 'CRM_Core_SelectValues::eventDate',
251 'end_event_adjust_unit' => array(
252 'name' => 'end_event_adjust_unit',
253 'type' => CRM_Utils_Type
::T_STRING
,
254 'title' => ts('End Event Adjust Unit') ,
255 'description' => 'Unit used for adjusting from the ending event.',
257 'size' => CRM_Utils_Type
::EIGHT
,
261 'pseudoconstant' => array(
262 'callback' => 'CRM_Core_SelectValues::unitList',
265 'end_event_adjust_interval' => array(
266 'name' => 'end_event_adjust_interval',
267 'type' => CRM_Utils_Type
::T_INT
,
268 'title' => ts('End Event Adjust Interval') ,
269 'description' => 'Status range ends this many units from end_event.',
271 'is_current_member' => array(
272 'name' => 'is_current_member',
273 'type' => CRM_Utils_Type
::T_BOOLEAN
,
274 'title' => ts('Current Membership?') ,
275 'description' => 'Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).',
278 'name' => 'is_admin',
279 'type' => CRM_Utils_Type
::T_BOOLEAN
,
280 'title' => ts('Admin Assigned Only?') ,
281 'description' => 'Is this status for admin/manual assignment only.',
285 'type' => CRM_Utils_Type
::T_INT
,
286 'title' => ts('Order') ,
288 'is_default' => array(
289 'name' => 'is_default',
290 'type' => CRM_Utils_Type
::T_BOOLEAN
,
291 'title' => ts('Default Status?') ,
292 'description' => 'Assign this status to a membership record if no other status match is found.',
294 'is_active' => array(
295 'name' => 'is_active',
296 'type' => CRM_Utils_Type
::T_BOOLEAN
,
297 'title' => ts('Is Active') ,
298 'description' => 'Is this membership_status enabled.',
301 'is_reserved' => array(
302 'name' => 'is_reserved',
303 'type' => CRM_Utils_Type
::T_BOOLEAN
,
304 'title' => ts('Is Reserved') ,
305 'description' => 'Is this membership_status reserved.',
309 return self
::$_fields;
312 * Returns an array containing, for each field, the arary key used for that
313 * field in self::$_fields.
317 static function &fieldKeys() {
318 if (!(self
::$_fieldKeys)) {
319 self
::$_fieldKeys = array(
321 'name' => 'membership_status',
323 'start_event' => 'start_event',
324 'start_event_adjust_unit' => 'start_event_adjust_unit',
325 'start_event_adjust_interval' => 'start_event_adjust_interval',
326 'end_event' => 'end_event',
327 'end_event_adjust_unit' => 'end_event_adjust_unit',
328 'end_event_adjust_interval' => 'end_event_adjust_interval',
329 'is_current_member' => 'is_current_member',
330 'is_admin' => 'is_admin',
331 'weight' => 'weight',
332 'is_default' => 'is_default',
333 'is_active' => 'is_active',
334 'is_reserved' => 'is_reserved',
337 return self
::$_fieldKeys;
340 * Returns the names of this table
344 static function getTableName() {
345 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
348 * Returns if this table needs to be logged
356 * Returns the list of fields that can be imported
358 * @param bool $prefix
362 static function &import($prefix = false) {
363 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'membership_status', $prefix, array());
367 * Returns the list of fields that can be exported
369 * @param bool $prefix
373 static function &export($prefix = false) {
374 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'membership_status', $prefix, array());