Skip to content

Commit

Permalink
Add field metadata to MembershipType schema info (xml)
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed May 14, 2018
1 parent f8f98c9 commit 6f85d05
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
25 changes: 23 additions & 2 deletions CRM/Member/DAO/MembershipType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Member/MembershipType.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:c86019d4817d79e1dd59d69eaa2a3eb6)
* (GenCodeChecksum:f79b8b7075dd740416b24eff8ebd147b)
*/

/**
Expand Down Expand Up @@ -246,6 +246,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 1,
'html' => [
'type' => 'Text',
],
],
'description' => [
'name' => 'description',
Expand Down Expand Up @@ -294,7 +297,7 @@ public static function &fields() {
'minimum_fee' => [
'name' => 'minimum_fee',
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('membership Type Minimum Fee'),
'title' => ts('Membership Type Minimum Fee'),
'description' => 'Minimum fee for this membership (0 for free/complimentary memberships).',
'precision' => [
18,
Expand All @@ -304,6 +307,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
],
'duration_unit' => [
'name' => 'duration_unit',
Expand Down Expand Up @@ -332,6 +338,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
],
'period_type' => [
'name' => 'period_type',
Expand All @@ -344,6 +353,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => [
'type' => 'Select',
],
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::periodType',
]
Expand Down Expand Up @@ -400,6 +412,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
],
'visibility' => [
'name' => 'visibility',
Expand All @@ -426,6 +441,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
],
'receipt_text_signup' => [
'name' => 'receipt_text_signup',
Expand Down Expand Up @@ -480,6 +498,9 @@ public static function &fields() {
'entity' => 'MembershipType',
'bao' => 'CRM_Member_BAO_MembershipType',
'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
Expand Down
23 changes: 22 additions & 1 deletion xml/schema/Member/MembershipType.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<length>128</length>
<localizable>true</localizable>
<comment>Name of Membership Type</comment>
<html>
<type>Text</type>
</html>
<add>1.5</add>
</field>
<field>
Expand Down Expand Up @@ -114,11 +117,14 @@
</foreignKey>
<field>
<name>minimum_fee</name>
<title>membership Type Minimum Fee</title>
<title>Membership Type Minimum Fee</title>
<type>decimal</type>
<length>18,9</length>
<comment>Minimum fee for this membership (0 for free/complimentary memberships).</comment>
<default>0</default>
<html>
<type>Text</type>
</html>
<add>1.5</add>
</field>
<field>
Expand All @@ -139,6 +145,9 @@
<name>duration_interval</name>
<title>Membership Type Duration Interval</title>
<type>int</type>
<html>
<type>Text</type>
</html>
<comment>Number of duration units in membership period (e.g. 1 year, 12 months).</comment>
<add>1.5</add>
</field>
Expand All @@ -148,6 +157,9 @@
<type>varchar</type>
<length>8</length>
<comment>Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.</comment>
<html>
<type>Select</type>
</html>
<pseudoconstant>
<callback>CRM_Core_SelectValues::periodType</callback>
</pseudoconstant>
Expand Down Expand Up @@ -199,6 +211,9 @@
<type>int</type>
<comment>Maximum number of related memberships.</comment>
<add>4.3</add>
<html>
<type>Text</type>
</html>
</field>
<field>
<name>visibility</name>
Expand All @@ -217,6 +232,9 @@
<name>weight</name>
<title>Order</title>
<type>int</type>
<html>
<type>Text</type>
</html>
<add>1.5</add>
</field>
<field>
Expand Down Expand Up @@ -262,5 +280,8 @@
<default>1</default>
<comment>Is this membership_type enabled</comment>
<add>1.5</add>
<html>
<type>CheckBox</type>
</html>
</field>
</table>

0 comments on commit 6f85d05

Please sign in to comment.