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/MembershipBlock.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:23f10318bfaa3e50862d8ad8853ce662)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Member_DAO_MembershipBlock
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_membership_block';
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 * FK to civicrm_contribution_page.id
88 * Membership types to be exposed by this block
92 public $membership_types;
94 * Optional foreign key to membership_type
98 public $membership_type_default;
100 * Display minimum membership fee
104 public $display_min_fee;
106 * Should membership transactions be processed separately
110 public $is_separate_payment;
112 * Title to display at top of block
118 * Text to display below title
128 public $renewal_title;
130 * Text to display for member renewal
134 public $renewal_text;
136 * Is membership sign up optional
142 * Is this membership_block enabled
150 * @return civicrm_membership_block
152 function __construct() {
153 $this->__table
= 'civicrm_membership_block';
154 parent
::__construct();
157 * Returns foreign keys and entity references
160 * [CRM_Core_Reference_Interface]
162 static function getReferenceColumns() {
163 if (!self
::$_links) {
164 self
::$_links = static ::createReferenceColumns(__CLASS__
);
165 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'entity_id', 'civicrm_contribution_page', 'id');
166 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'membership_type_default', 'civicrm_membership_type', 'id');
168 return self
::$_links;
171 * Returns all the column names of this table
175 static function &fields() {
176 if (!(self
::$_fields)) {
177 self
::$_fields = array(
180 'type' => CRM_Utils_Type
::T_INT
,
181 'title' => ts('Membership Block ID') ,
182 'description' => 'Membership Id',
185 'entity_table' => array(
186 'name' => 'entity_table',
187 'type' => CRM_Utils_Type
::T_STRING
,
188 'title' => ts('Membership Block Entity Table') ,
189 'description' => 'Name for Membership Status',
191 'size' => CRM_Utils_Type
::BIG
,
193 'entity_id' => array(
194 'name' => 'entity_id',
195 'type' => CRM_Utils_Type
::T_INT
,
196 'title' => ts('Membership Block Entity ID') ,
197 'description' => 'FK to civicrm_contribution_page.id',
199 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
201 'membership_types' => array(
202 'name' => 'membership_types',
203 'type' => CRM_Utils_Type
::T_STRING
,
204 'title' => ts('Membership Block Membership Types') ,
205 'description' => 'Membership types to be exposed by this block',
207 'size' => CRM_Utils_Type
::HUGE
,
209 'membership_type_default' => array(
210 'name' => 'membership_type_default',
211 'type' => CRM_Utils_Type
::T_INT
,
212 'title' => ts('Membership Block Default Type') ,
213 'description' => 'Optional foreign key to membership_type',
214 'FKClassName' => 'CRM_Member_DAO_MembershipType',
216 'display_min_fee' => array(
217 'name' => 'display_min_fee',
218 'type' => CRM_Utils_Type
::T_BOOLEAN
,
219 'title' => ts('Membership Block Display Minimum Fee') ,
220 'description' => 'Display minimum membership fee',
223 'is_separate_payment' => array(
224 'name' => 'is_separate_payment',
225 'type' => CRM_Utils_Type
::T_BOOLEAN
,
226 'title' => ts('Membership Block Is Separate Payment') ,
227 'description' => 'Should membership transactions be processed separately',
230 'new_title' => array(
231 'name' => 'new_title',
232 'type' => CRM_Utils_Type
::T_STRING
,
233 'title' => ts('Membership Block New Title') ,
234 'description' => 'Title to display at top of block',
236 'size' => CRM_Utils_Type
::HUGE
,
239 'name' => 'new_text',
240 'type' => CRM_Utils_Type
::T_TEXT
,
241 'title' => ts('Membership Block New Text') ,
242 'description' => 'Text to display below title',
244 'renewal_title' => array(
245 'name' => 'renewal_title',
246 'type' => CRM_Utils_Type
::T_STRING
,
247 'title' => ts('Membership Block Renewal Title') ,
248 'description' => 'Title for renewal',
250 'size' => CRM_Utils_Type
::HUGE
,
252 'renewal_text' => array(
253 'name' => 'renewal_text',
254 'type' => CRM_Utils_Type
::T_TEXT
,
255 'title' => ts('Membership Block Renewal Text') ,
256 'description' => 'Text to display for member renewal',
258 'is_required' => array(
259 'name' => 'is_required',
260 'type' => CRM_Utils_Type
::T_BOOLEAN
,
261 'title' => ts('Is Required') ,
262 'description' => 'Is membership sign up optional',
264 'is_active' => array(
265 'name' => 'is_active',
266 'type' => CRM_Utils_Type
::T_BOOLEAN
,
267 'title' => ts('Is Active') ,
268 'description' => 'Is this membership_block enabled',
273 return self
::$_fields;
276 * Returns an array containing, for each field, the arary key used for that
277 * field in self::$_fields.
281 static function &fieldKeys() {
282 if (!(self
::$_fieldKeys)) {
283 self
::$_fieldKeys = array(
285 'entity_table' => 'entity_table',
286 'entity_id' => 'entity_id',
287 'membership_types' => 'membership_types',
288 'membership_type_default' => 'membership_type_default',
289 'display_min_fee' => 'display_min_fee',
290 'is_separate_payment' => 'is_separate_payment',
291 'new_title' => 'new_title',
292 'new_text' => 'new_text',
293 'renewal_title' => 'renewal_title',
294 'renewal_text' => 'renewal_text',
295 'is_required' => 'is_required',
296 'is_active' => 'is_active',
299 return self
::$_fieldKeys;
302 * Returns the names of this table
306 static function getTableName() {
307 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
310 * Returns if this table needs to be logged
318 * Returns the list of fields that can be imported
320 * @param bool $prefix
324 static function &import($prefix = false) {
325 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'membership_block', $prefix, array());
329 * Returns the list of fields that can be exported
331 * @param bool $prefix
335 static function &export($prefix = false) {
336 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'membership_block', $prefix, array());