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/Pledge/PledgeBlock.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:7d41ef2735585fe5dddadb9a8f63a7fd)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Pledge_DAO_PledgeBlock constructor.
40 class CRM_Pledge_DAO_PledgeBlock
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_pledge_block';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * physical tablename for entity being joined to pledge, e.g. civicrm_contact
66 * FK to entity table specified in entity_table column.
72 * Delimited list of supported frequency units
76 public $pledge_frequency_unit;
78 * Is frequency interval exposed on the contribution form.
82 public $is_pledge_interval;
84 * The maximum number of payment reminders to send for any given payment.
88 public $max_reminders;
90 * Send initial reminder this many days prior to the payment due date.
94 public $initial_reminder_day;
96 * Send additional reminder this many days after last one sent, up to maximum number of reminders.
100 public $additional_reminder_day;
102 * The date the first scheduled pledge occurs.
106 public $pledge_start_date;
108 * If true - recurring start date is shown.
112 public $is_pledge_start_date_visible;
114 * If true - recurring start date is editable.
118 public $is_pledge_start_date_editable;
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',
154 'table_name' => 'civicrm_pledge_block',
155 'entity' => 'PledgeBlock',
156 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
158 'entity_table' => array(
159 'name' => 'entity_table',
160 'type' => CRM_Utils_Type
::T_STRING
,
161 'title' => ts('Entity Table') ,
162 'description' => 'physical tablename for entity being joined to pledge, e.g. civicrm_contact',
164 'size' => CRM_Utils_Type
::BIG
,
165 'table_name' => 'civicrm_pledge_block',
166 'entity' => 'PledgeBlock',
167 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
169 'entity_id' => array(
170 'name' => 'entity_id',
171 'type' => CRM_Utils_Type
::T_INT
,
172 'title' => ts('Entity Id') ,
173 'description' => 'FK to entity table specified in entity_table column.',
175 'table_name' => 'civicrm_pledge_block',
176 'entity' => 'PledgeBlock',
177 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
179 'pledge_frequency_unit' => array(
180 'name' => 'pledge_frequency_unit',
181 'type' => CRM_Utils_Type
::T_STRING
,
182 'title' => ts('Pledge Frequency Unit') ,
183 'description' => 'Delimited list of supported frequency units',
185 'size' => CRM_Utils_Type
::HUGE
,
186 'table_name' => 'civicrm_pledge_block',
187 'entity' => 'PledgeBlock',
188 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
190 'is_pledge_interval' => array(
191 'name' => 'is_pledge_interval',
192 'type' => CRM_Utils_Type
::T_BOOLEAN
,
193 'title' => ts('Expose Frequency Interval?') ,
194 'description' => 'Is frequency interval exposed on the contribution form.',
195 'table_name' => 'civicrm_pledge_block',
196 'entity' => 'PledgeBlock',
197 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
199 'max_reminders' => array(
200 'name' => 'max_reminders',
201 'type' => CRM_Utils_Type
::T_INT
,
202 'title' => ts('Maximum Number of Reminders') ,
203 'description' => 'The maximum number of payment reminders to send for any given payment.',
205 'table_name' => 'civicrm_pledge_block',
206 'entity' => 'PledgeBlock',
207 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
209 'initial_reminder_day' => array(
210 'name' => 'initial_reminder_day',
211 'type' => CRM_Utils_Type
::T_INT
,
212 'title' => ts('Initial Reminder Day') ,
213 'description' => 'Send initial reminder this many days prior to the payment due date.',
215 'table_name' => 'civicrm_pledge_block',
216 'entity' => 'PledgeBlock',
217 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
219 'additional_reminder_day' => array(
220 'name' => 'additional_reminder_day',
221 'type' => CRM_Utils_Type
::T_INT
,
222 'title' => ts('Additional Reminder Days') ,
223 'description' => 'Send additional reminder this many days after last one sent, up to maximum number of reminders.',
225 'table_name' => 'civicrm_pledge_block',
226 'entity' => 'PledgeBlock',
227 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
229 'pledge_start_date' => array(
230 'name' => 'pledge_start_date',
231 'type' => CRM_Utils_Type
::T_STRING
,
232 'title' => ts('Pledge Start Date') ,
233 'description' => 'The date the first scheduled pledge occurs.',
235 'size' => CRM_Utils_Type
::BIG
,
236 'table_name' => 'civicrm_pledge_block',
237 'entity' => 'PledgeBlock',
238 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
240 'is_pledge_start_date_visible' => array(
241 'name' => 'is_pledge_start_date_visible',
242 'type' => CRM_Utils_Type
::T_BOOLEAN
,
243 'title' => ts('Show Recurring Donation Start Date?') ,
244 'description' => 'If true - recurring start date is shown.',
246 'table_name' => 'civicrm_pledge_block',
247 'entity' => 'PledgeBlock',
248 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
250 'is_pledge_start_date_editable' => array(
251 'name' => 'is_pledge_start_date_editable',
252 'type' => CRM_Utils_Type
::T_BOOLEAN
,
253 'title' => ts('Allow Edits to Recurring Donation Start Date?') ,
254 'description' => 'If true - recurring start date is editable.',
256 'table_name' => 'civicrm_pledge_block',
257 'entity' => 'PledgeBlock',
258 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
261 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
263 return Civi
::$statics[__CLASS__
]['fields'];
266 * Return a mapping from field-name to the corresponding key (as used in fields()).
269 * Array(string $name => string $uniqueName).
271 static function &fieldKeys() {
272 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
273 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
275 return Civi
::$statics[__CLASS__
]['fieldKeys'];
278 * Returns the names of this table
282 static function getTableName() {
283 return self
::$_tableName;
286 * Returns if this table needs to be logged
294 * Returns the list of fields that can be imported
296 * @param bool $prefix
300 static function &import($prefix = false) {
301 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'pledge_block', $prefix, array());
305 * Returns the list of fields that can be exported
307 * @param bool $prefix
311 static function &export($prefix = false) {
312 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'pledge_block', $prefix, array());