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/Pledge/PledgeBlock.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:884b8af4af4d96ca57a59d3bfe2d0634)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Pledge_DAO_PledgeBlock
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_pledge_block';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * physical tablename for entity being joined to pledge, e.g. civicrm_contact
64 * FK to entity table specified in entity_table column.
70 * Delimited list of supported frequency units
74 public $pledge_frequency_unit;
76 * Is frequency interval exposed on the contribution form.
80 public $is_pledge_interval;
82 * The maximum number of payment reminders to send for any given payment.
86 public $max_reminders;
88 * Send initial reminder this many days prior to the payment due date.
92 public $initial_reminder_day;
94 * Send additional reminder this many days after last one sent, up to maximum number of reminders.
98 public $additional_reminder_day;
100 * The date the first scheduled pledge occurs.
104 public $pledge_start_date;
106 * If true - recurring start date is shown.
110 public $is_pledge_start_date_visible;
112 * If true - recurring start date is editable.
116 public $is_pledge_start_date_editable;
120 * @return civicrm_pledge_block
122 function __construct() {
123 $this->__table
= 'civicrm_pledge_block';
124 parent
::__construct();
127 * Returns foreign keys and entity references
130 * [CRM_Core_Reference_Interface]
132 static function getReferenceColumns() {
133 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
134 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
135 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
136 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
138 return Civi
::$statics[__CLASS__
]['links'];
141 * Returns all the column names of this table
145 static function &fields() {
146 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
147 Civi
::$statics[__CLASS__
]['fields'] = array(
150 'type' => CRM_Utils_Type
::T_INT
,
151 'title' => ts('Pledge Block ID') ,
152 'description' => 'Pledge ID',
155 'entity_table' => array(
156 'name' => 'entity_table',
157 'type' => CRM_Utils_Type
::T_STRING
,
158 'title' => ts('Entity Table') ,
159 'description' => 'physical tablename for entity being joined to pledge, e.g. civicrm_contact',
161 'size' => CRM_Utils_Type
::BIG
,
163 'entity_id' => array(
164 'name' => 'entity_id',
165 'type' => CRM_Utils_Type
::T_INT
,
166 'title' => ts('Entity Id') ,
167 'description' => 'FK to entity table specified in entity_table column.',
170 'pledge_frequency_unit' => array(
171 'name' => 'pledge_frequency_unit',
172 'type' => CRM_Utils_Type
::T_STRING
,
173 'title' => ts('Pledge Frequency Unit') ,
174 'description' => 'Delimited list of supported frequency units',
176 'size' => CRM_Utils_Type
::HUGE
,
178 'is_pledge_interval' => array(
179 'name' => 'is_pledge_interval',
180 'type' => CRM_Utils_Type
::T_BOOLEAN
,
181 'title' => ts('Expose Frequency Interval?') ,
182 'description' => 'Is frequency interval exposed on the contribution form.',
184 'max_reminders' => array(
185 'name' => 'max_reminders',
186 'type' => CRM_Utils_Type
::T_INT
,
187 'title' => ts('Maximum Number of Reminders') ,
188 'description' => 'The maximum number of payment reminders to send for any given payment.',
191 'initial_reminder_day' => array(
192 'name' => 'initial_reminder_day',
193 'type' => CRM_Utils_Type
::T_INT
,
194 'title' => ts('Initial Reminder Day') ,
195 'description' => 'Send initial reminder this many days prior to the payment due date.',
198 'additional_reminder_day' => array(
199 'name' => 'additional_reminder_day',
200 'type' => CRM_Utils_Type
::T_INT
,
201 'title' => ts('Additional Reminder Days') ,
202 'description' => 'Send additional reminder this many days after last one sent, up to maximum number of reminders.',
205 'pledge_start_date' => array(
206 'name' => 'pledge_start_date',
207 'type' => CRM_Utils_Type
::T_STRING
,
208 'title' => ts('Pledge Start Date') ,
209 'description' => 'The date the first scheduled pledge occurs.',
211 'size' => CRM_Utils_Type
::BIG
,
213 'is_pledge_start_date_visible' => array(
214 'name' => 'is_pledge_start_date_visible',
215 'type' => CRM_Utils_Type
::T_BOOLEAN
,
216 'title' => ts('Show Recurring Donation Start Date?') ,
217 'description' => 'If true - recurring start date is shown.',
220 'is_pledge_start_date_editable' => array(
221 'name' => 'is_pledge_start_date_editable',
222 'type' => CRM_Utils_Type
::T_BOOLEAN
,
223 'title' => ts('Allow Edits to Recurring Donation Start Date?') ,
224 'description' => 'If true - recurring start date is editable.',
228 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
230 return Civi
::$statics[__CLASS__
]['fields'];
233 * Return a mapping from field-name to the corresponding key (as used in fields()).
236 * Array(string $name => string $uniqueName).
238 static function &fieldKeys() {
239 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
240 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
242 return Civi
::$statics[__CLASS__
]['fieldKeys'];
245 * Returns the names of this table
249 static function getTableName() {
250 return self
::$_tableName;
253 * Returns if this table needs to be logged
261 * Returns the list of fields that can be imported
263 * @param bool $prefix
267 static function &import($prefix = false) {
268 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'pledge_block', $prefix, array());
272 * Returns the list of fields that can be exported
274 * @param bool $prefix
278 static function &export($prefix = false) {
279 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'pledge_block', $prefix, array());