Improve metadata on LineItem DAO
authoreileen <emcnaughton@wikimedia.org>
Fri, 18 Sep 2020 20:07:56 +0000 (08:07 +1200)
committereileen <emcnaughton@wikimedia.org>
Fri, 18 Sep 2020 20:07:56 +0000 (08:07 +1200)
Adds pseudoconstants, labels

CRM/Price/DAO/LineItem.php
xml/schema/Price/LineItem.xml

index 7e9b779089b6a69901ba9489d8094ab9866cd937..82cea2af7f512d1b3cd2966176db187513fe6d3e 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Price/LineItem.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5a365a7d4b14c9b5963aeb61576395e4)
+ * (GenCodeChecksum:c9962dd4253fbcf43073bf10fbb0ce86)
  */
 
 /**
@@ -238,6 +238,12 @@ class CRM_Price_DAO_LineItem extends CRM_Core_DAO {
           'bao' => 'CRM_Price_BAO_LineItem',
           'localizable' => 0,
           'FKClassName' => 'CRM_Price_DAO_PriceField',
+          'pseudoconstant' => [
+            'table' => 'civicrm_price_field',
+            'keyColumn' => 'id',
+            'labelColumn' => 'label',
+            'nameColumn' => 'name',
+          ],
           'add' => '1.7',
         ],
         'label' => [
@@ -343,12 +349,18 @@ class CRM_Price_DAO_LineItem extends CRM_Core_DAO {
           'bao' => 'CRM_Price_BAO_LineItem',
           'localizable' => 0,
           'FKClassName' => 'CRM_Price_DAO_PriceFieldValue',
+          'pseudoconstant' => [
+            'table' => 'civicrm_price_field_value',
+            'keyColumn' => 'id',
+            'labelColumn' => 'label',
+            'nameColumn' => 'name',
+          ],
           'add' => '3.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.'),
           'where' => 'civicrm_line_item.financial_type_id',
           'default' => 'NULL',
@@ -359,6 +371,7 @@ class CRM_Price_DAO_LineItem extends CRM_Core_DAO {
           'FKClassName' => 'CRM_Financial_DAO_FinancialType',
           'html' => [
             'type' => 'Select',
+            'label' => ts("Financial Type"),
           ],
           'pseudoconstant' => [
             'table' => 'civicrm_financial_type',
index 82b9c9a7cc56c9d5d6c012334206ba9655d8ab97..ee61447fee6c031b2c48b42c3117b461e707e534 100644 (file)
     <title>Line Item Price Field</title>
     <type>int unsigned</type>
     <comment>FK to civicrm_price_field</comment>
+    <pseudoconstant>
+      <table>civicrm_price_field</table>
+      <keyColumn>id</keyColumn>
+      <nameColumn>name</nameColumn>
+      <labelColumn>label</labelColumn>
+    </pseudoconstant>
     <!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
     <add>1.7</add>
   </field>
     <type>int unsigned</type>
     <default>NULL</default>
     <comment>FK to civicrm_price_field_value</comment>
+    <pseudoconstant>
+      <table>civicrm_price_field_value</table>
+      <keyColumn>id</keyColumn>
+      <nameColumn>name</nameColumn>
+      <labelColumn>label</labelColumn>
+    </pseudoconstant>
     <add>3.3</add>
   </field>
   <foreignKey>
   </foreignKey>
   <field>
     <name>financial_type_id</name>
-    <title>Financial Type</title>
+    <title>Financial Type ID</title>
     <type>int unsigned</type>
     <default>NULL</default>
     <pseudoconstant>
     <add>4.3</add>
     <html>
       <type>Select</type>
+      <label>Financial Type</label>
     </html>
   </field>
   <foreignKey>