First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,522 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Member/Membership.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:1a9ebe9e0d3ab9247f2a3dda32bab22a)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Member_DAO_Membership constructor.
*/
class CRM_Member_DAO_Membership extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_membership';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* Membership Id
*
* @var int unsigned
*/
public $id;
/**
* FK to Contact ID
*
* @var int unsigned
*/
public $contact_id;
/**
* FK to Membership Type
*
* @var int unsigned
*/
public $membership_type_id;
/**
* Beginning of initial membership period (member since...).
*
* @var date
*/
public $join_date;
/**
* Beginning of current uninterrupted membership period.
*
* @var date
*/
public $start_date;
/**
* Current membership period expire date.
*
* @var date
*/
public $end_date;
/**
*
* @var string
*/
public $source;
/**
* FK to Membership Status
*
* @var int unsigned
*/
public $status_id;
/**
* Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.
*
* @var boolean
*/
public $is_override;
/**
* Optional FK to Parent Membership.
*
* @var int unsigned
*/
public $owner_membership_id;
/**
* Maximum number of related memberships (membership_type override).
*
* @var int
*/
public $max_related;
/**
*
* @var boolean
*/
public $is_test;
/**
*
* @var boolean
*/
public $is_pay_later;
/**
* Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.
*
* @var int unsigned
*/
public $contribution_recur_id;
/**
* The campaign for which this membership is attached.
*
* @var int unsigned
*/
public $campaign_id;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_membership';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_id', 'civicrm_membership_type', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'status_id', 'civicrm_membership_status', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'owner_membership_id', 'civicrm_membership', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_recur_id', 'civicrm_contribution_recur', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'membership_id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership ID') ,
'description' => 'Membership Id',
'required' => true,
'import' => true,
'where' => 'civicrm_membership.id',
'headerPattern' => '/^(m(embership\s)?id)$/i',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
) ,
'membership_contact_id' => array(
'name' => 'contact_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Contact ID') ,
'description' => 'FK to Contact ID',
'required' => true,
'import' => true,
'where' => 'civicrm_membership.contact_id',
'headerPattern' => '/contact(.?id)?/i',
'dataPattern' => '/^\d+$/',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
'html' => array(
'type' => 'EntityRef',
) ,
) ,
'membership_type_id' => array(
'name' => 'membership_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Type Id') ,
'description' => 'FK to Membership Type',
'required' => true,
'import' => true,
'where' => 'civicrm_membership.membership_type_id',
'headerPattern' => '/^(m(embership\s)?type)$/i',
'dataPattern' => '',
'export' => false,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_MembershipType',
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_membership_type',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'join_date' => array(
'name' => 'join_date',
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Member Since') ,
'description' => 'Beginning of initial membership period (member since...).',
'import' => true,
'where' => 'civicrm_membership.join_date',
'headerPattern' => '/^join|(j(oin\s)?date)$/i',
'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'Select Date',
'formatType' => 'activityDate',
) ,
) ,
'membership_start_date' => array(
'name' => 'start_date',
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Membership Start Date') ,
'description' => 'Beginning of current uninterrupted membership period.',
'import' => true,
'where' => 'civicrm_membership.start_date',
'headerPattern' => '/(member(ship)?.)?start(s)?(.date$)?/i',
'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'Select Date',
'formatType' => 'activityDate',
) ,
) ,
'membership_end_date' => array(
'name' => 'end_date',
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Membership Expiration Date') ,
'description' => 'Current membership period expire date.',
'import' => true,
'where' => 'civicrm_membership.end_date',
'headerPattern' => '/(member(ship)?.)?end(s)?(.date$)?/i',
'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'Select Date',
'formatType' => 'activityDate',
) ,
) ,
'membership_source' => array(
'name' => 'source',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Source') ,
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'import' => true,
'where' => 'civicrm_membership.source',
'headerPattern' => '/^(member(ship?))?source$/i',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'status_id' => array(
'name' => 'status_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Status Id') ,
'description' => 'FK to Membership Status',
'required' => true,
'import' => true,
'where' => 'civicrm_membership.status_id',
'headerPattern' => '/(member(ship|).)?(status)$/i',
'dataPattern' => '',
'export' => false,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_MembershipStatus',
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_membership_status',
'keyColumn' => 'id',
'labelColumn' => 'label',
)
) ,
'is_override' => array(
'name' => 'is_override',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Status Override') ,
'description' => 'Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.',
'import' => true,
'where' => 'civicrm_membership.is_override',
'headerPattern' => '/override$/i',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'CheckBox',
) ,
) ,
'owner_membership_id' => array(
'name' => 'owner_membership_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Primary Member ID') ,
'description' => 'Optional FK to Parent Membership.',
'export' => true,
'where' => 'civicrm_membership.owner_membership_id',
'headerPattern' => '',
'dataPattern' => '',
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_Membership',
) ,
'max_related' => array(
'name' => 'max_related',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Max Related') ,
'description' => 'Maximum number of related memberships (membership_type override).',
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'Text',
) ,
) ,
'member_is_test' => array(
'name' => 'is_test',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Test') ,
'import' => true,
'where' => 'civicrm_membership.is_test',
'headerPattern' => '/(is.)?test(.member(ship)?)?/i',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'CheckBox',
) ,
) ,
'member_is_pay_later' => array(
'name' => 'is_pay_later',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Pay Later') ,
'import' => true,
'where' => 'civicrm_membership.is_pay_later',
'headerPattern' => '/(is.)?(pay(.)?later)$/i',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'html' => array(
'type' => 'CheckBox',
) ,
) ,
'contribution_recur_id' => array(
'name' => 'contribution_recur_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Recurring Contribution') ,
'description' => 'Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.',
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'FKClassName' => 'CRM_Contribute_DAO_ContributionRecur',
) ,
'member_campaign_id' => array(
'name' => 'campaign_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Campaign') ,
'description' => 'The campaign for which this membership is attached.',
'import' => true,
'where' => 'civicrm_membership.campaign_id',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership',
'entity' => 'Membership',
'bao' => 'CRM_Member_BAO_Membership',
'localizable' => 0,
'FKClassName' => 'CRM_Campaign_DAO_Campaign',
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'table' => 'civicrm_campaign',
'keyColumn' => 'id',
'labelColumn' => 'title',
)
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'index_owner_membership_id' => array(
'name' => 'index_owner_membership_id',
'field' => array(
0 => 'owner_membership_id',
) ,
'localizable' => false,
'sig' => 'civicrm_membership::0::owner_membership_id',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,368 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Member/MembershipBlock.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:3ee510fab11783acf6ee994f090436f6)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Member_DAO_MembershipBlock constructor.
*/
class CRM_Member_DAO_MembershipBlock extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_membership_block';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* Membership Id
*
* @var int unsigned
*/
public $id;
/**
* Name for Membership Status
*
* @var string
*/
public $entity_table;
/**
* FK to civicrm_contribution_page.id
*
* @var int unsigned
*/
public $entity_id;
/**
* Membership types to be exposed by this block
*
* @var string
*/
public $membership_types;
/**
* Optional foreign key to membership_type
*
* @var int unsigned
*/
public $membership_type_default;
/**
* Display minimum membership fee
*
* @var boolean
*/
public $display_min_fee;
/**
* Should membership transactions be processed separately
*
* @var boolean
*/
public $is_separate_payment;
/**
* Title to display at top of block
*
* @var string
*/
public $new_title;
/**
* Text to display below title
*
* @var text
*/
public $new_text;
/**
* Title for renewal
*
* @var string
*/
public $renewal_title;
/**
* Text to display for member renewal
*
* @var text
*/
public $renewal_text;
/**
* Is membership sign up optional
*
* @var boolean
*/
public $is_required;
/**
* Is this membership_block enabled
*
* @var boolean
*/
public $is_active;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_membership_block';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'entity_id', 'civicrm_contribution_page', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_default', 'civicrm_membership_type', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Block ID') ,
'description' => 'Membership Id',
'required' => true,
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
'entity_table' => array(
'name' => 'entity_table',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Block Entity Table') ,
'description' => 'Name for Membership Status',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
'entity_id' => array(
'name' => 'entity_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Block Entity ID') ,
'description' => 'FK to civicrm_contribution_page.id',
'required' => true,
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
) ,
'membership_types' => array(
'name' => 'membership_types',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Block Membership Types') ,
'description' => 'Membership types to be exposed by this block',
'maxlength' => 1024,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
'membership_type_default' => array(
'name' => 'membership_type_default',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Block Default Type') ,
'description' => 'Optional foreign key to membership_type',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_MembershipType',
) ,
'display_min_fee' => array(
'name' => 'display_min_fee',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Membership Block Display Minimum Fee') ,
'description' => 'Display minimum membership fee',
'default' => '1',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
'is_separate_payment' => array(
'name' => 'is_separate_payment',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Membership Block Is Separate Payment') ,
'description' => 'Should membership transactions be processed separately',
'default' => '1',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
'new_title' => array(
'name' => 'new_title',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Block New Title') ,
'description' => 'Title to display at top of block',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 1,
) ,
'new_text' => array(
'name' => 'new_text',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Membership Block New Text') ,
'description' => 'Text to display below title',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 1,
) ,
'renewal_title' => array(
'name' => 'renewal_title',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Block Renewal Title') ,
'description' => 'Title for renewal',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 1,
) ,
'renewal_text' => array(
'name' => 'renewal_text',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Membership Block Renewal Text') ,
'description' => 'Text to display for member renewal',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 1,
) ,
'is_required' => array(
'name' => 'is_required',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Required') ,
'description' => 'Is membership sign up optional',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Active') ,
'description' => 'Is this membership_block enabled',
'default' => '1',
'table_name' => 'civicrm_membership_block',
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_block', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_block', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array();
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,296 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Member/MembershipLog.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:9182bcbeed0a05c3fed5f3027ba89668)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Member_DAO_MembershipLog constructor.
*/
class CRM_Member_DAO_MembershipLog extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_membership_log';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
*
* @var int unsigned
*/
public $id;
/**
* FK to Membership table
*
* @var int unsigned
*/
public $membership_id;
/**
* New status assigned to membership by this action. FK to Membership Status
*
* @var int unsigned
*/
public $status_id;
/**
* New membership period start date
*
* @var date
*/
public $start_date;
/**
* New membership period expiration date.
*
* @var date
*/
public $end_date;
/**
* FK to Contact ID of person under whose credentials this data modification was made.
*
* @var int unsigned
*/
public $modified_id;
/**
* Date this membership modification action was logged.
*
* @var date
*/
public $modified_date;
/**
* FK to Membership Type.
*
* @var int unsigned
*/
public $membership_type_id;
/**
* Maximum number of related memberships.
*
* @var int
*/
public $max_related;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_membership_log';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_id', 'civicrm_membership', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'status_id', 'civicrm_membership_status', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'modified_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_id', 'civicrm_membership_type', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Log ID') ,
'required' => true,
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
) ,
'membership_id' => array(
'name' => 'membership_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership ID') ,
'description' => 'FK to Membership table',
'required' => true,
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_Membership',
) ,
'status_id' => array(
'name' => 'status_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Status') ,
'description' => 'New status assigned to membership by this action. FK to Membership Status',
'required' => true,
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_MembershipStatus',
) ,
'start_date' => array(
'name' => 'start_date',
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Membership Log Start Date') ,
'description' => 'New membership period start date',
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
) ,
'end_date' => array(
'name' => 'end_date',
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Membership Log End Date') ,
'description' => 'New membership period expiration date.',
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
) ,
'modified_id' => array(
'name' => 'modified_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Log modified By') ,
'description' => 'FK to Contact ID of person under whose credentials this data modification was made.',
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
) ,
'modified_date' => array(
'name' => 'modified_date',
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Membership Change Date') ,
'description' => 'Date this membership modification action was logged.',
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
) ,
'membership_type_id' => array(
'name' => 'membership_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Type ID') ,
'description' => 'FK to Membership Type.',
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_MembershipType',
) ,
'max_related' => array(
'name' => 'max_related',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Maximum Related Memberships') ,
'description' => 'Maximum number of related memberships.',
'table_name' => 'civicrm_membership_log',
'entity' => 'MembershipLog',
'bao' => 'CRM_Member_BAO_MembershipLog',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_log', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_log', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array();
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,206 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Member/MembershipPayment.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:f5961822475bf3b83377d72f9ed34b07)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Member_DAO_MembershipPayment constructor.
*/
class CRM_Member_DAO_MembershipPayment extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_membership_payment';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
*
* @var int unsigned
*/
public $id;
/**
* FK to Membership table
*
* @var int unsigned
*/
public $membership_id;
/**
* FK to contribution table.
*
* @var int unsigned
*/
public $contribution_id;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_membership_payment';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_id', 'civicrm_membership', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Payment ID') ,
'required' => true,
'table_name' => 'civicrm_membership_payment',
'entity' => 'MembershipPayment',
'bao' => 'CRM_Member_BAO_MembershipPayment',
'localizable' => 0,
) ,
'membership_id' => array(
'name' => 'membership_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership') ,
'description' => 'FK to Membership table',
'required' => true,
'table_name' => 'civicrm_membership_payment',
'entity' => 'MembershipPayment',
'bao' => 'CRM_Member_BAO_MembershipPayment',
'localizable' => 0,
'FKClassName' => 'CRM_Member_DAO_Membership',
) ,
'contribution_id' => array(
'name' => 'contribution_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Contribution') ,
'description' => 'FK to contribution table.',
'table_name' => 'civicrm_membership_payment',
'entity' => 'MembershipPayment',
'bao' => 'CRM_Member_BAO_MembershipPayment',
'localizable' => 0,
'FKClassName' => 'CRM_Contribute_DAO_Contribution',
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return self::$_tableName;
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_payment', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_payment', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'UI_contribution_membership' => array(
'name' => 'UI_contribution_membership',
'field' => array(
0 => 'contribution_id',
1 => 'membership_id',
) ,
'localizable' => false,
'unique' => true,
'sig' => 'civicrm_membership_payment::1::contribution_id::membership_id',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,411 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Member/MembershipStatus.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:dfe977e53a6b66703ab4eca3560048e6)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Member_DAO_MembershipStatus constructor.
*/
class CRM_Member_DAO_MembershipStatus extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_membership_status';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* Membership Id
*
* @var int unsigned
*/
public $id;
/**
* Name for Membership Status
*
* @var string
*/
public $name;
/**
* Label for Membership Status
*
* @var string
*/
public $label;
/**
* Event when this status starts.
*
* @var string
*/
public $start_event;
/**
* Unit used for adjusting from start_event.
*
* @var string
*/
public $start_event_adjust_unit;
/**
* Status range begins this many units from start_event.
*
* @var int
*/
public $start_event_adjust_interval;
/**
* Event after which this status ends.
*
* @var string
*/
public $end_event;
/**
* Unit used for adjusting from the ending event.
*
* @var string
*/
public $end_event_adjust_unit;
/**
* Status range ends this many units from end_event.
*
* @var int
*/
public $end_event_adjust_interval;
/**
* Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).
*
* @var boolean
*/
public $is_current_member;
/**
* Is this status for admin/manual assignment only.
*
* @var boolean
*/
public $is_admin;
/**
*
* @var int
*/
public $weight;
/**
* Assign this status to a membership record if no other status match is found.
*
* @var boolean
*/
public $is_default;
/**
* Is this membership_status enabled.
*
* @var boolean
*/
public $is_active;
/**
* Is this membership_status reserved.
*
* @var boolean
*/
public $is_reserved;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_membership_status';
parent::__construct();
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Status ID') ,
'description' => 'Membership Id',
'required' => true,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'membership_status' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Status') ,
'description' => 'Name for Membership Status',
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'import' => true,
'where' => 'civicrm_membership_status.name',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'label' => array(
'name' => 'label',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Label') ,
'description' => 'Label for Membership Status',
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 1,
) ,
'start_event' => array(
'name' => 'start_event',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Start Event') ,
'description' => 'Event when this status starts.',
'maxlength' => 12,
'size' => CRM_Utils_Type::TWELVE,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::eventDate',
)
) ,
'start_event_adjust_unit' => array(
'name' => 'start_event_adjust_unit',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Start Event Adjust Unit') ,
'description' => 'Unit used for adjusting from start_event.',
'maxlength' => 8,
'size' => CRM_Utils_Type::EIGHT,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::unitList',
)
) ,
'start_event_adjust_interval' => array(
'name' => 'start_event_adjust_interval',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Start Event Adjust Interval') ,
'description' => 'Status range begins this many units from start_event.',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'end_event' => array(
'name' => 'end_event',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('End Event') ,
'description' => 'Event after which this status ends.',
'maxlength' => 12,
'size' => CRM_Utils_Type::TWELVE,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::eventDate',
)
) ,
'end_event_adjust_unit' => array(
'name' => 'end_event_adjust_unit',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('End Event Adjust Unit') ,
'description' => 'Unit used for adjusting from the ending event.',
'maxlength' => 8,
'size' => CRM_Utils_Type::EIGHT,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::unitList',
)
) ,
'end_event_adjust_interval' => array(
'name' => 'end_event_adjust_interval',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('End Event Adjust Interval') ,
'description' => 'Status range ends this many units from end_event.',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'is_current_member' => array(
'name' => 'is_current_member',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Current Membership?') ,
'description' => 'Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'is_admin' => array(
'name' => 'is_admin',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Admin Assigned Only?') ,
'description' => 'Is this status for admin/manual assignment only.',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'weight' => array(
'name' => 'weight',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Order') ,
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'is_default' => array(
'name' => 'is_default',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Default Status?') ,
'description' => 'Assign this status to a membership record if no other status match is found.',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Active') ,
'description' => 'Is this membership_status enabled.',
'default' => '1',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
'is_reserved' => array(
'name' => 'is_reserved',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Reserved') ,
'description' => 'Is this membership_status reserved.',
'table_name' => 'civicrm_membership_status',
'entity' => 'MembershipStatus',
'bao' => 'CRM_Member_BAO_MembershipStatus',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_status', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_status', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array();
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}

View file

@ -0,0 +1,557 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
*
* Generated from xml/schema/CRM/Member/MembershipType.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:c86019d4817d79e1dd59d69eaa2a3eb6)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
/**
* CRM_Member_DAO_MembershipType constructor.
*/
class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
*
* @var string
*/
static $_tableName = 'civicrm_membership_type';
/**
* Should CiviCRM log any modifications to this table in the civicrm_log table.
*
* @var boolean
*/
static $_log = true;
/**
* Membership Id
*
* @var int unsigned
*/
public $id;
/**
* Which Domain is this match entry for
*
* @var int unsigned
*/
public $domain_id;
/**
* Name of Membership Type
*
* @var string
*/
public $name;
/**
* Description of Membership Type
*
* @var string
*/
public $description;
/**
* Owner organization for this membership type. FK to Contact ID
*
* @var int unsigned
*/
public $member_of_contact_id;
/**
* If membership is paid by a contribution - what financial type should be used. FK to civicrm_financial_type.id
*
* @var int unsigned
*/
public $financial_type_id;
/**
* Minimum fee for this membership (0 for free/complimentary memberships).
*
* @var float
*/
public $minimum_fee;
/**
* Unit in which membership period is expressed.
*
* @var string
*/
public $duration_unit;
/**
* Number of duration units in membership period (e.g. 1 year, 12 months).
*
* @var int
*/
public $duration_interval;
/**
* Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.
*
* @var string
*/
public $period_type;
/**
* For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.
*
* @var int
*/
public $fixed_period_start_day;
/**
* For fixed period memberships, signups after this day (mmdd) rollover to next period.
*
* @var int
*/
public $fixed_period_rollover_day;
/**
* FK to Relationship Type ID
*
* @var string
*/
public $relationship_type_id;
/**
*
* @var string
*/
public $relationship_direction;
/**
* Maximum number of related memberships.
*
* @var int
*/
public $max_related;
/**
*
* @var string
*/
public $visibility;
/**
*
* @var int
*/
public $weight;
/**
* Receipt Text for membership signup
*
* @var string
*/
public $receipt_text_signup;
/**
* Receipt Text for membership renewal
*
* @var string
*/
public $receipt_text_renewal;
/**
* 0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;
*
* @var boolean
*/
public $auto_renew;
/**
* Is this membership_type enabled
*
* @var boolean
*/
public $is_active;
/**
* Class constructor.
*/
function __construct() {
$this->__table = 'civicrm_membership_type';
parent::__construct();
}
/**
* Returns foreign keys and entity references.
*
* @return array
* [CRM_Core_Reference_Interface]
*/
static function getReferenceColumns() {
if (!isset(Civi::$statics[__CLASS__]['links'])) {
Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'member_of_contact_id', 'civicrm_contact', 'id');
Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
}
return Civi::$statics[__CLASS__]['links'];
}
/**
* Returns all the column names of this table
*
* @return array
*/
static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = array(
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Type ID') ,
'description' => 'Membership Id',
'required' => true,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'domain_id' => array(
'name' => 'domain_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Type Domain') ,
'description' => 'Which Domain is this match entry for',
'required' => true,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'FKClassName' => 'CRM_Core_DAO_Domain',
'pseudoconstant' => array(
'table' => 'civicrm_domain',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'membership_type' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type') ,
'description' => 'Name of Membership Type',
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'import' => true,
'where' => 'civicrm_membership_type.name',
'headerPattern' => '',
'dataPattern' => '',
'export' => true,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 1,
) ,
'description' => array(
'name' => 'description',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type Description') ,
'description' => 'Description of Membership Type',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 1,
'html' => array(
'type' => 'TextArea',
) ,
) ,
'member_of_contact_id' => array(
'name' => 'member_of_contact_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Type Organization') ,
'description' => 'Owner organization for this membership type. FK to Contact ID',
'required' => true,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
) ,
'financial_type_id' => array(
'name' => 'financial_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Financial Type') ,
'description' => 'If membership is paid by a contribution - what financial type should be used. FK to civicrm_financial_type.id',
'required' => true,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialType',
'pseudoconstant' => array(
'table' => 'civicrm_financial_type',
'keyColumn' => 'id',
'labelColumn' => 'name',
)
) ,
'minimum_fee' => array(
'name' => 'minimum_fee',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('membership Type Minimum Fee') ,
'description' => 'Minimum fee for this membership (0 for free/complimentary memberships).',
'precision' => array(
18,
9
) ,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'duration_unit' => array(
'name' => 'duration_unit',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type Duration Unit') ,
'description' => 'Unit in which membership period is expressed.',
'maxlength' => 8,
'size' => CRM_Utils_Type::EIGHT,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::membershipTypeUnitList',
)
) ,
'duration_interval' => array(
'name' => 'duration_interval',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Membership Type Duration Interval') ,
'description' => 'Number of duration units in membership period (e.g. 1 year, 12 months).',
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'period_type' => array(
'name' => 'period_type',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type Plan') ,
'description' => 'Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.',
'maxlength' => 8,
'size' => CRM_Utils_Type::EIGHT,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::periodType',
)
) ,
'fixed_period_start_day' => array(
'name' => 'fixed_period_start_day',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Fixed Period Start Day') ,
'description' => 'For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.',
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'fixed_period_rollover_day' => array(
'name' => 'fixed_period_rollover_day',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Fixed Period Rollover Day') ,
'description' => 'For fixed period memberships, signups after this day (mmdd) rollover to next period.',
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'relationship_type_id' => array(
'name' => 'relationship_type_id',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type Relationship') ,
'description' => 'FK to Relationship Type ID',
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'relationship_direction' => array(
'name' => 'relationship_direction',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Relationship Direction') ,
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'max_related' => array(
'name' => 'max_related',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Max Related Members for Type') ,
'description' => 'Maximum number of related memberships.',
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'visibility' => array(
'name' => 'visibility',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Visible') ,
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => array(
'type' => 'Select',
) ,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::memberVisibility',
)
) ,
'weight' => array(
'name' => 'weight',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Order') ,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
'receipt_text_signup' => array(
'name' => 'receipt_text_signup',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type Receipt Text') ,
'description' => 'Receipt Text for membership signup',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => array(
'type' => 'TextArea',
) ,
) ,
'receipt_text_renewal' => array(
'name' => 'receipt_text_renewal',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Membership Type Renewal Text') ,
'description' => 'Receipt Text for membership renewal',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => array(
'type' => 'TextArea',
) ,
) ,
'auto_renew' => array(
'name' => 'auto_renew',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Auto Renew') ,
'description' => '0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;',
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'pseudoconstant' => array(
'callback' => 'CRM_Core_SelectValues::memberAutoRenew',
)
) ,
'is_active' => array(
'name' => 'is_active',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is Active') ,
'description' => 'Is this membership_type enabled',
'default' => '1',
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
return Civi::$statics[__CLASS__]['fields'];
}
/**
* Return a mapping from field-name to the corresponding key (as used in fields()).
*
* @return array
* Array(string $name => string $uniqueName).
*/
static function &fieldKeys() {
if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
}
return Civi::$statics[__CLASS__]['fieldKeys'];
}
/**
* Returns the names of this table
*
* @return string
*/
static function getTableName() {
return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
}
/**
* Returns if this table needs to be logged
*
* @return boolean
*/
function getLog() {
return self::$_log;
}
/**
* Returns the list of fields that can be imported
*
* @param bool $prefix
*
* @return array
*/
static function &import($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'membership_type', $prefix, array());
return $r;
}
/**
* Returns the list of fields that can be exported
*
* @param bool $prefix
*
* @return array
*/
static function &export($prefix = false) {
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'membership_type', $prefix, array());
return $r;
}
/**
* Returns the list of indices
*/
public static function indices($localize = TRUE) {
$indices = array(
'index_relationship_type_id' => array(
'name' => 'index_relationship_type_id',
'field' => array(
0 => 'relationship_type_id',
) ,
'localizable' => false,
'sig' => 'civicrm_membership_type::0::relationship_type_id',
) ,
);
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
}
}