X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FFinancial%2FDAO%2FFinancialItem.php;h=82d71822af91545d38db8e3e1bae3b81f5d4d6a7;hb=e7a6b91ae4e3004b2d097ed318524d2ea7cf3fb0;hp=68a607ebe0353905c1169d73a8b52fdaae03bffa;hpb=928f422aee028a8b1d1547ff73250e6c5ed5e32f;p=civicrm-core.git diff --git a/CRM/Financial/DAO/FinancialItem.php b/CRM/Financial/DAO/FinancialItem.php index 68a607ebe0..82d71822af 100644 --- a/CRM/Financial/DAO/FinancialItem.php +++ b/CRM/Financial/DAO/FinancialItem.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ -| Copyright CiviCRM LLC (c) 2004-2016 | +| Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -26,24 +26,26 @@ */ /** * @package CRM - * @copyright CiviCRM LLC (c) 2004-2016 + * @copyright CiviCRM LLC (c) 2004-2017 * * Generated from xml/schema/CRM/Financial/FinancialItem.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:4abc5641f9aab2a8d925cf5898a3a858) + * (GenCodeChecksum:95e199969f4ff93ccae635fb7e0d30f2) */ require_once 'CRM/Core/DAO.php'; require_once 'CRM/Utils/Type.php'; +/** + * CRM_Financial_DAO_FinancialItem constructor. + */ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { /** - * static instance to hold the table name + * Static instance to hold the table name. * * @var string */ static $_tableName = 'civicrm_financial_item'; /** - * static value to see if we should log any modifications to - * this table in the civicrm_log table + * Should CiviCRM log any modifications to this table in the civicrm_log table. * * @var boolean */ @@ -114,16 +116,14 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { */ public $entity_id; /** - * class constructor - * - * @return civicrm_financial_item + * Class constructor. */ function __construct() { $this->__table = 'civicrm_financial_item'; parent::__construct(); } /** - * Returns foreign keys and entity references + * Returns foreign keys and entity references. * * @return array * [CRM_Core_Reference_Interface] @@ -151,6 +151,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Item ID') , 'required' => true, + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , 'created_date' => array( 'name' => 'created_date', @@ -159,6 +163,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'description' => 'Date and time the item was created', 'required' => true, 'default' => 'CURRENT_TIMESTAMP', + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , 'transaction_date' => array( 'name' => 'transaction_date', @@ -166,6 +174,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'title' => ts('Financial Item Transaction Date') , 'description' => 'Date and time of the source transaction', 'required' => true, + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , 'contact_id' => array( 'name' => 'contact_id', @@ -177,6 +189,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'where' => 'civicrm_financial_item.contact_id', 'headerPattern' => '', 'dataPattern' => '', + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', ) , 'description' => array( @@ -186,6 +202,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'description' => 'Human readable description of this item, to ease display without lookup of source item.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , 'amount' => array( 'name' => 'amount', @@ -197,6 +217,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 20, 2 ) , + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , 'currency' => array( 'name' => 'currency', @@ -209,6 +233,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'where' => 'civicrm_financial_item.currency', 'headerPattern' => '', 'dataPattern' => '', + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, 'html' => array( 'type' => 'Select', ) , @@ -224,6 +252,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Account ID') , 'description' => 'FK to civicrm_financial_account', + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount', 'html' => array( 'type' => 'Select', @@ -243,6 +275,10 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'where' => 'civicrm_financial_item.status_id', 'headerPattern' => '', 'dataPattern' => '', + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, 'html' => array( 'type' => 'Select', ) , @@ -258,12 +294,20 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { 'description' => 'The table providing the source of this item such as civicrm_line_item', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , 'entity_id' => array( 'name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Entity ID') , 'description' => 'The specific source item that is responsible for the creation of this financial_item', + 'table_name' => 'civicrm_financial_item', + 'entity' => 'FinancialItem', + 'bao' => 'CRM_Financial_BAO_FinancialItem', + 'localizable' => 0, ) , ); CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); @@ -320,4 +364,37 @@ class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO { $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'financial_item', $prefix, array()); return $r; } + /** + * Returns the list of indices + */ + public static function indices($localize = TRUE) { + $indices = array( + 'IX_created_date' => array( + 'name' => 'IX_created_date', + 'field' => array( + 0 => 'created_date', + ) , + 'localizable' => false, + 'sig' => 'civicrm_financial_item::0::created_date', + ) , + 'IX_transaction_date' => array( + 'name' => 'IX_transaction_date', + 'field' => array( + 0 => 'transaction_date', + ) , + 'localizable' => false, + 'sig' => 'civicrm_financial_item::0::transaction_date', + ) , + 'index_entity_id_entity_table' => array( + 'name' => 'index_entity_id_entity_table', + 'field' => array( + 0 => 'entity_id', + 1 => 'entity_table', + ) , + 'localizable' => false, + 'sig' => 'civicrm_financial_item::0::entity_id::entity_table', + ) , + ); + return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; + } }