DAOs with singular/plural options for entity titles
[civicrm-core.git] / CRM / Contribute / DAO / Contribution.php
index 493a0ae7d50f0b13ada9dcdb4f96397d2c00557e..174e9bf69591ed243117ec5f61e0137dac46330c 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Generated from xml/schema/CRM/Contribute/Contribution.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:37ea1e1c100be249d416ec13f8269c52)
+ * (GenCodeChecksum:d937ea0497be1a1aeb1bac09986dd802)
  */
 
 /**
  * Database access object for the Contribution entity.
  */
 class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
+  const EXT = 'civicrm';
+  const TABLE_ADDED = '1.3';
 
   /**
    * Static instance to hold the table name.
@@ -250,9 +252,12 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
 
   /**
    * Returns localized title of this entity.
+   *
+   * @param bool $plural
+   *   Whether to return the plural version of the title.
    */
-  public static function getEntityTitle() {
-    return ts('Contributions');
+  public static function getEntityTitle($plural = FALSE) {
+    return $plural ? ts('Contributions') : ts('Contribution');
   }
 
   /**
@@ -299,6 +304,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'contribution_contact_id' => [
           'name' => 'contact_id',
@@ -319,11 +325,12 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'EntityRef',
           ],
+          'add' => '1.3',
         ],
         'financial_type_id' => [
           'name' => 'financial_type_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Financial Type'),
+          'title' => ts('Financial Type ID'),
           'description' => ts('FK to Financial Type for (total_amount - non_deductible_amount).'),
           'where' => 'civicrm_contribution.financial_type_id',
           'export' => TRUE,
@@ -334,12 +341,14 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'FKClassName' => 'CRM_Financial_DAO_FinancialType',
           'html' => [
             'type' => 'Select',
+            'label' => ts("Financial Type"),
           ],
           'pseudoconstant' => [
             'table' => 'civicrm_financial_type',
             'keyColumn' => 'id',
             'labelColumn' => 'name',
           ],
+          'add' => '4.3',
         ],
         'contribution_page_id' => [
           'name' => 'contribution_page_id',
@@ -356,12 +365,14 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
           'html' => [
             'type' => 'Select',
+            'label' => ts("Contribution Page"),
           ],
           'pseudoconstant' => [
             'table' => 'civicrm_contribution_page',
             'keyColumn' => 'id',
             'labelColumn' => 'title',
           ],
+          'add' => '1.5',
         ],
         'payment_instrument_id' => [
           'name' => 'payment_instrument_id',
@@ -382,6 +393,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'optionGroupName' => 'payment_instrument',
             'optionEditPath' => 'civicrm/admin/options/payment_instrument',
           ],
+          'add' => '1.3',
         ],
         'receive_date' => [
           'name' => 'receive_date',
@@ -401,6 +413,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'type' => 'Select Date',
             'formatType' => 'activityDateTime',
           ],
+          'add' => '1.3',
         ],
         'non_deductible_amount' => [
           'name' => 'non_deductible_amount',
@@ -424,6 +437,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'total_amount' => [
           'name' => 'total_amount',
@@ -447,6 +461,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'fee_amount' => [
           'name' => 'fee_amount',
@@ -469,6 +484,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'net_amount' => [
           'name' => 'net_amount',
@@ -491,6 +507,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'trxn_id' => [
           'name' => 'trxn_id',
@@ -510,6 +527,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'invoice_id' => [
           'name' => 'invoice_id',
@@ -529,6 +547,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'invoice_number' => [
           'name' => 'invoice_number',
@@ -548,6 +567,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '4.7',
         ],
         'currency' => [
           'name' => 'currency',
@@ -576,6 +596,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'nameColumn' => 'name',
             'abbrColumn' => 'symbol',
           ],
+          'add' => '1.3',
         ],
         'contribution_cancel_date' => [
           'name' => 'cancel_date',
@@ -595,6 +616,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'type' => 'Select Date',
             'formatType' => 'activityDateTime',
           ],
+          'add' => '1.3',
         ],
         'cancel_reason' => [
           'name' => 'cancel_reason',
@@ -611,6 +633,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'receipt_date' => [
           'name' => 'receipt_date',
@@ -630,6 +653,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'type' => 'Select Date',
             'formatType' => 'activityDateTime',
           ],
+          'add' => '1.3',
         ],
         'thankyou_date' => [
           'name' => 'thankyou_date',
@@ -649,6 +673,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'type' => 'Select Date',
             'formatType' => 'activityDateTime',
           ],
+          'add' => '1.3',
         ],
         'contribution_source' => [
           'name' => 'source',
@@ -668,6 +693,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.3',
         ],
         'amount_level' => [
           'name' => 'amount_level',
@@ -683,6 +709,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '1.7',
         ],
         'contribution_recur_id' => [
           'name' => 'contribution_recur_id',
@@ -696,6 +723,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'bao' => 'CRM_Contribute_BAO_Contribution',
           'localizable' => 0,
           'FKClassName' => 'CRM_Contribute_DAO_ContributionRecur',
+          'add' => '1.4',
         ],
         'is_test' => [
           'name' => 'is_test',
@@ -712,6 +740,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'CheckBox',
           ],
+          'add' => NULL,
         ],
         'is_pay_later' => [
           'name' => 'is_pay_later',
@@ -728,6 +757,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'CheckBox',
           ],
+          'add' => '2.1',
         ],
         'contribution_status_id' => [
           'name' => 'contribution_status_id',
@@ -749,6 +779,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'optionGroupName' => 'contribution_status',
             'optionEditPath' => 'civicrm/admin/options/contribution_status',
           ],
+          'add' => '1.6',
         ],
         'contribution_address_id' => [
           'name' => 'address_id',
@@ -762,6 +793,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'bao' => 'CRM_Contribute_BAO_Contribution',
           'localizable' => 0,
           'FKClassName' => 'CRM_Core_DAO_Address',
+          'add' => '2.2',
         ],
         'contribution_check_number' => [
           'name' => 'check_number',
@@ -780,6 +812,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '2.2',
         ],
         'contribution_campaign_id' => [
           'name' => 'campaign_id',
@@ -802,6 +835,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'keyColumn' => 'id',
             'labelColumn' => 'title',
           ],
+          'add' => '3.4',
         ],
         'creditnote_id' => [
           'name' => 'creditnote_id',
@@ -821,6 +855,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '4.6',
         ],
         'tax_amount' => [
           'name' => 'tax_amount',
@@ -843,6 +878,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'Text',
           ],
+          'add' => '4.6',
         ],
         'revenue_recognition_date' => [
           'name' => 'revenue_recognition_date',
@@ -862,6 +898,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
             'type' => 'Select Date',
             'formatType' => 'activityDateTime',
           ],
+          'add' => '4.7',
         ],
         'is_template' => [
           'name' => 'is_template',
@@ -879,6 +916,7 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
           'html' => [
             'type' => 'CheckBox',
           ],
+          'add' => '5.20',
         ],
       ];
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);