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:27ee8365a58c51c15fcf0ae78b2f5f32)
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',
159 'entity_table' => array(
160 'name' => 'entity_table',
161 'type' => CRM_Utils_Type
::T_STRING
,
162 'title' => ts('Entity Table') ,
163 'description' => 'physical tablename for entity being joined to pledge, e.g. civicrm_contact',
165 'size' => CRM_Utils_Type
::BIG
,
166 'table_name' => 'civicrm_pledge_block',
167 'entity' => 'PledgeBlock',
168 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
171 'entity_id' => array(
172 'name' => 'entity_id',
173 'type' => CRM_Utils_Type
::T_INT
,
174 'title' => ts('Entity Id') ,
175 'description' => 'FK to entity table specified in entity_table column.',
177 'table_name' => 'civicrm_pledge_block',
178 'entity' => 'PledgeBlock',
179 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
182 'pledge_frequency_unit' => array(
183 'name' => 'pledge_frequency_unit',
184 'type' => CRM_Utils_Type
::T_STRING
,
185 'title' => ts('Pledge Frequency Unit') ,
186 'description' => 'Delimited list of supported frequency units',
188 'size' => CRM_Utils_Type
::HUGE
,
189 'table_name' => 'civicrm_pledge_block',
190 'entity' => 'PledgeBlock',
191 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
194 'is_pledge_interval' => array(
195 'name' => 'is_pledge_interval',
196 'type' => CRM_Utils_Type
::T_BOOLEAN
,
197 'title' => ts('Expose Frequency Interval?') ,
198 'description' => 'Is frequency interval exposed on the contribution form.',
199 'table_name' => 'civicrm_pledge_block',
200 'entity' => 'PledgeBlock',
201 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
204 'max_reminders' => array(
205 'name' => 'max_reminders',
206 'type' => CRM_Utils_Type
::T_INT
,
207 'title' => ts('Maximum Number of Reminders') ,
208 'description' => 'The maximum number of payment reminders to send for any given payment.',
210 'table_name' => 'civicrm_pledge_block',
211 'entity' => 'PledgeBlock',
212 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
215 'initial_reminder_day' => array(
216 'name' => 'initial_reminder_day',
217 'type' => CRM_Utils_Type
::T_INT
,
218 'title' => ts('Initial Reminder Day') ,
219 'description' => 'Send initial reminder this many days prior to the payment due date.',
221 'table_name' => 'civicrm_pledge_block',
222 'entity' => 'PledgeBlock',
223 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
226 'additional_reminder_day' => array(
227 'name' => 'additional_reminder_day',
228 'type' => CRM_Utils_Type
::T_INT
,
229 'title' => ts('Additional Reminder Days') ,
230 'description' => 'Send additional reminder this many days after last one sent, up to maximum number of reminders.',
232 'table_name' => 'civicrm_pledge_block',
233 'entity' => 'PledgeBlock',
234 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
237 'pledge_start_date' => array(
238 'name' => 'pledge_start_date',
239 'type' => CRM_Utils_Type
::T_STRING
,
240 'title' => ts('Pledge Start Date') ,
241 'description' => 'The date the first scheduled pledge occurs.',
243 'size' => CRM_Utils_Type
::BIG
,
244 'table_name' => 'civicrm_pledge_block',
245 'entity' => 'PledgeBlock',
246 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
249 'is_pledge_start_date_visible' => array(
250 'name' => 'is_pledge_start_date_visible',
251 'type' => CRM_Utils_Type
::T_BOOLEAN
,
252 'title' => ts('Show Recurring Donation Start Date?') ,
253 'description' => 'If true - recurring start date is shown.',
255 'table_name' => 'civicrm_pledge_block',
256 'entity' => 'PledgeBlock',
257 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
260 'is_pledge_start_date_editable' => array(
261 'name' => 'is_pledge_start_date_editable',
262 'type' => CRM_Utils_Type
::T_BOOLEAN
,
263 'title' => ts('Allow Edits to Recurring Donation Start Date?') ,
264 'description' => 'If true - recurring start date is editable.',
266 'table_name' => 'civicrm_pledge_block',
267 'entity' => 'PledgeBlock',
268 'bao' => 'CRM_Pledge_BAO_PledgeBlock',
272 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
274 return Civi
::$statics[__CLASS__
]['fields'];
277 * Return a mapping from field-name to the corresponding key (as used in fields()).
280 * Array(string $name => string $uniqueName).
282 static function &fieldKeys() {
283 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
284 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
286 return Civi
::$statics[__CLASS__
]['fieldKeys'];
289 * Returns the names of this table
293 static function getTableName() {
294 return self
::$_tableName;
297 * Returns if this table needs to be logged
305 * Returns the list of fields that can be imported
307 * @param bool $prefix
311 static function &import($prefix = false) {
312 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'pledge_block', $prefix, array());
316 * Returns the list of fields that can be exported
318 * @param bool $prefix
322 static function &export($prefix = false) {
323 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'pledge_block', $prefix, array());
327 * Returns the list of indices
329 public static function indices($localize = TRUE) {
331 'index_entity' => array(
332 'name' => 'index_entity',
337 'localizable' => false,
338 'sig' => 'civicrm_pledge_block::0::entity_table::entity_id',
341 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;