Case, Campaign, Language PseudoConstants CRM-12464
authorColeman Watts <coleman@civicrm.org>
Wed, 8 May 2013 23:41:35 +0000 (16:41 -0700)
committerColeman Watts <coleman@civicrm.org>
Thu, 30 May 2013 05:14:05 +0000 (22:14 -0700)
----------------------------------------
* CRM-12464: Search improvements in 4.4
  http://issues.civicrm.org/jira/browse/CRM-12464

CRM/Campaign/PseudoConstant.php
CRM/Case/PseudoConstant.php
CRM/Contribute/PseudoConstant.php
CRM/Core/OptionGroup.php
CRM/Core/Payment/Form.php
CRM/Core/PseudoConstant.php
tests/phpunit/CRM/Core/PseudoConstantTest.php
xml/schema/Activity/Activity.xml
xml/schema/Campaign/Campaign.xml
xml/schema/Case/Case.xml
xml/schema/Event/Event.xml

index 5f3920ea8b0f4a228d197bb0898a6f2b553b7294..73592c94b4412b5a1832929dea04fad6f12e625c 100755 (executable)
@@ -67,6 +67,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant {
   private static $engagementLevel;
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
    * Get all the survey activity types
    *
    * @access public
@@ -91,6 +92,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
    * Get all campaign types.
    *
    * The static array campaignType is returned
@@ -110,6 +112,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
    * Get all campaign status.
    *
    * The static array campaignStatus is returned
@@ -129,6 +132,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
    * Get all Engagement Level.
    *
    * The static array Engagement Level is returned
@@ -148,7 +152,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant {
 
   /**
    * Flush given pseudoconstant so it can be reread from db
-   * nex time it's requested.
+   * next time it's requested.
    *
    * @access public
    * @static
@@ -156,7 +160,7 @@ class CRM_Campaign_PseudoConstant extends CRM_Core_PseudoConstant {
    * @param boolean $name pseudoconstant to be flushed
    *
    */
-  public static function flush($name) {
+  public static function flush($name = 'cache') {
    if (isset(self::$$name)) {
       self::$$name = NULL;
     }
index 1c2c2e93fc36330229af95a074195d60c3108b15..c597da5b15817a66a626706f3f293787ddbba80e 100644 (file)
@@ -265,7 +265,7 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant {
 
   /**
    * Flush given pseudoconstant so it can be reread from db
-   * nex time it's requested.
+   * next time it's requested.
    *
    * @access public
    * @static
@@ -273,7 +273,7 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant {
    * @param boolean $name pseudoconstant to be flushed
    *
    */
-  public static function flush($name) {
+  public static function flush($name = 'cache') {
    if (isset(self::$$name)) {
       self::$$name = NULL;
     }
index 9b8302e613e88089c0423f0cdbeb73a1585b3693..e83383a3ebd4c49f223b62acb1cd8987a2c92d94 100644 (file)
@@ -83,14 +83,6 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    */
   private static $paymentInstrument;
 
-  /**
-   * credit card
-   *
-   * @var array
-   * @static
-   */
-  private static $creditCard;
-
   /**
    * contribution status
    *
@@ -114,6 +106,8 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   private static $pcpStatus;
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   *
    * Get all the financial types
    *
    * @access public
@@ -142,6 +136,8 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   *
    * Get all the financial Accounts
    *
    * @access public
@@ -191,6 +187,8 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   *
    * Get all the contribution pages
    *
    * @param integer $id  id of the contribution page
@@ -223,6 +221,8 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+   *
    * Get all the payment instruments
    *
    * @access public
@@ -249,16 +249,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
    * @static
    */
   public static function &creditCard() {
-    $acceptCreditCard = array();
-    $creditCard = CRM_Core_OptionGroup::values('accept_creditcard');
-
-    if (!$creditCard) {
-      $creditCard = array();
-    }
-    foreach ($creditCard as $key => $value) {
-      $acceptCreditCard[$value] = $value;
-    }
-    return $acceptCreditCard;
+    return CRM_Core_OptionGroup::values('accept_creditcard', FALSE, FALSE, FALSE, NULL, 'label', TRUE, FALSE, 'name');
   }
 
   /**
index 6f4fd7faf9762528286d057e1665c99722e0bacd..64131a314b3c9927f34acb7e3002d60bc778193b 100644 (file)
@@ -92,6 +92,7 @@ class CRM_Core_OptionGroup {
    * @param $labelColumnName string the column to use for 'label'
    * @param $onlyActive boolean return only the action option values
    * @param $fresh      boolean ignore cache entries and go back to DB
+   * @param $keyColumnName string the column to use for 'key'
    *
    * @return array      the values as specified by the above params
    * @static
index 91d913a1a2a45e68af377a767ba8f4b2d783bb95..9f61ac2276d0db6106e6beb5a319f38f3a047384 100644 (file)
@@ -186,7 +186,8 @@ class CRM_Core_Payment_Form {
     );
   }
 
-  /** create all fields needed for direct debit transaction
+  /**
+   * create all fields needed for direct debit transaction
    *
    * @return void
    * @access public
index d70e769ac62d8c8f24bdbe112d6418d0c4739c8e..bad70b4eee3cc4b56053429d1597a6e6c78b65ef 100644 (file)
@@ -1261,6 +1261,7 @@ WHERE  id = %1";
   }
 
   /**
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
    * Get all active payment processors
    *
    * The static array paymentProcessor is returned
@@ -1295,7 +1296,7 @@ WHERE  id = %1";
   }
 
   /**
-   * Get all active payment processors
+   * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
    *
    * The static array paymentProcessorType is returned
    *
index 0658a5185a77c4a7289bd96be9d3705947ab7e49..67b8a80848a28a3cde04b7948bf208d5c10e3bef 100644 (file)
@@ -146,6 +146,21 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'fieldName' => 'priority_id',
           'sample' => 'Urgent',
         ),
+        array(
+          'fieldName' => 'engagement_level',
+          'sample' => '1',
+        ),
+        array(
+          'fieldName' => 'medium_id',
+          'sample' => 'Phone',
+        ),
+      ),
+      'CRM_Campaign_DAO_Campaign' => array(
+        array(
+          'fieldName' => 'status_id',
+          'sample' => 'Completed',
+          'max' => 50,
+        ),
       ),
       'CRM_Campaign_DAO_Survey' => array(
         array(
@@ -522,6 +537,12 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
           'max' => 200,
         ),
       ),
+      'CRM_Case_DAO_Case' => array(
+        array(
+          'fieldName' => 'status_id',
+          'sample' => 'Ongoing',
+        ),
+      ),
     );
 
     foreach ($fields as $daoName => $daoFields) {
index cb229b34b4f1781644d9d5f098b37bdeb8d9269c..98175f37830df9b96bb2ace98fca0c293f28a1ea 100644 (file)
@@ -9,7 +9,7 @@
   <field>
       <name>id</name>
       <uniqueName>activity_id</uniqueName>
-      <title>Activity ID</title> 
+      <title>Activity ID</title>
       <import>true</import>
       <type>int unsigned</type>
       <required>true</required>
@@ -23,7 +23,7 @@
   <field>
       <name>source_contact_id</name>
       <type>int unsigned</type>
-      <title>Source Contact</title> 
+      <title>Source Contact</title>
       <import>true</import>
       <headerPattern>/(activity.)?source(.contact(.id)?)?/i</headerPattern>
       <comment>Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.</comment>
        <add>1.1</add>
        <drop>4.4</drop>
        <onDelete>SET NULL</onDelete>
-  </foreignKey>  
+  </foreignKey>
   <index>
        <name>UI_source_contact_id</name>
-       <fieldName>source_contact_id</fieldName>       
+       <fieldName>source_contact_id</fieldName>
        <add>2.0</add>
        <drop>3.2</drop>
   </index>
@@ -54,7 +54,7 @@
   </field>
   <index>
        <name>UI_source_record_id</name>
-       <fieldName>source_record_id</fieldName>       
+       <fieldName>source_record_id</fieldName>
        <add>3.2</add>
   </index>
   <field>
@@ -74,7 +74,7 @@
   </field>
   <index>
        <name>UI_activity_type_id</name>
-       <fieldName>activity_type_id</fieldName>       
+       <fieldName>activity_type_id</fieldName>
        <add>1.6</add>
   </index>
 
@@ -85,7 +85,7 @@
        <required>true</required>
        <comment>Name of table where item being referenced is stored.</comment>
        <add>1.1</add>
-       <drop>2.0</drop>       
+       <drop>2.0</drop>
   </field>
 
   <field>
@@ -94,7 +94,7 @@
        <required>true</required>
        <comment>Foreign key to the referenced item.</comment>
        <add>1.1</add>
-       <drop>2.0</drop>       
+       <drop>2.0</drop>
   </field>
 
   <field>
        <add>1.1</add>
        <drop>2.0</drop>
   </field>
-  
+
   <field>
        <name>activity_date_time</name>
        <import>true</import>
        <headerPattern>/(activity.)?date(.time$)?/i</headerPattern>
        <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.</comment>
        <add>2.0</add>
-  </field> 
+  </field>
   <field>
        <name>due_date_time</name>
        <type>datetime</type>
        <comment>Date and time this activity is due.</comment>
        <add>2.0</add>
-       <drop>3.0</drop>     
-  </field>  
+       <drop>3.0</drop>
+  </field>
   <field>
        <name>duration_hours</name>
        <type>int unsigned</type>
        <comment>Planned or actual duration of meeting - hours.</comment>
        <add>1.1</add>
-       <drop>2.0</drop>       
+       <drop>2.0</drop>
   </field>
 
   <field>
       <type>int unsigned</type>
       <comment>Planned or actual duration of meeting - minutes.</comment>
       <add>1.1</add>
-      <drop>2.0</drop>             
+      <drop>2.0</drop>
   </field>
 
   <field>
       <name>duration</name>
       <uniqueName>activity_duration</uniqueName>
-      <title>Duration</title> 
+      <title>Duration</title>
       <import>true</import>
       <type>int unsigned</type>
       <headerPattern>/(activity.)?duration(s)?$/i</headerPattern>
       <name>details</name>
       <uniqueName>activity_details</uniqueName>
       <title>Details</title>
-      <import>true</import> 
+      <import>true</import>
       <type>text</type>
       <rows>8</rows>
       <cols>60</cols>
   <field>
        <name>is_test</name>
        <title>Test</title>
-       <uniqueName>activity_is_test</uniqueName> 
+       <uniqueName>activity_is_test</uniqueName>
        <type>boolean</type>
        <default>0</default>
        <import>true</import>
        <add>2.0</add>
   </field>
   <field>
-       <name>medium_id</name>
-       <uniqueName>activity_medium_id</uniqueName>
-       <title>Activity Medium</title>
-       <type>int unsigned</type>
-       <default>NULL</default>
-       <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
-       <add>2.2</add>
+      <name>medium_id</name>
+      <uniqueName>activity_medium_id</uniqueName>
+      <title>Activity Medium</title>
+      <type>int unsigned</type>
+      <default>NULL</default>
+      <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
+      <pseudoconstant>
+        <optionGroupName>encounter_medium</optionGroupName>
+      </pseudoconstant>
+      <add>2.2</add>
   </field>
   <index>
        <name>index_medium_id</name>
        <type>boolean</type>
        <default>0</default>
        <add>2.2</add>
-  </field>     
-  <field> 
+  </field>
+  <field>
        <name>relationship_id</name>
        <title>Relationship Id</title>
-       <type>int unsigned</type> 
+       <type>int unsigned</type>
        <default>NULL</default>
-       <comment>FK to Relationship ID</comment> 
-       <add>2.2</add> 
+       <comment>FK to Relationship ID</comment>
+       <add>2.2</add>
   </field>
-  <foreignKey> 
-       <name>relationship_id</name> 
-       <table>civicrm_relationship</table> 
-       <key>id</key> 
+  <foreignKey>
+       <name>relationship_id</name>
+       <table>civicrm_relationship</table>
+       <key>id</key>
        <onDelete>SET NULL</onDelete>
-  </foreignKey>               
+  </foreignKey>
   <field>
        <name>is_current_revision</name>
        <title>Is this activity a current revision in versioning chain?</title>
        <name>index_is_current_revision</name>
        <fieldName>is_current_revision</fieldName>
        <add>2.2</add>
-  </index> 
+  </index>
   <field>
       <name>original_id</name>
       <type>int unsigned</type>
        <fieldName>original_id</fieldName>
        <add>2.2</add>
        <drop>3.2</drop>
-  </index>    
+  </index>
   <field>
        <name>result</name>
        <uniqueName>activity_result</uniqueName>
        <fieldName>is_deleted</fieldName>
        <add>2.2</add>
   </index>
-  <field> 
+  <field>
        <name>campaign_id</name>
        <uniqueName>activity_campaign_id</uniqueName>
        <type>int unsigned</type>
        <title>Campaign ID</title>
-       <import>true</import> 
-       <comment>The campaign for which this activity has been triggered.</comment> 
-       <add>3.4</add> 
-  </field>
-  <field> 
-       <name>engagement_level</name>
-       <uniqueName>activity_engagement_level</uniqueName>
-       <type>int unsigned</type>
-       
-       
-       <title>Engagement Index</title>
        <import>true</import>
-       <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment> 
-       <add>3.4</add> 
+       <comment>The campaign for which this activity has been triggered.</comment>
+       <add>3.4</add>
   </field>
-  <foreignKey> 
-       <name>campaign_id</name> 
-       <table>civicrm_campaign</table> 
-       <key>id</key> 
+  <foreignKey>
+       <name>campaign_id</name>
+       <table>civicrm_campaign</table>
+       <key>id</key>
        <onDelete>SET NULL</onDelete>
   </foreignKey>
+  <field>
+      <name>engagement_level</name>
+      <uniqueName>activity_engagement_level</uniqueName>
+      <type>int unsigned</type>
+      <title>Engagement Index</title>
+      <import>true</import>
+      <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment>
+      <pseudoconstant>
+        <optionGroupName>engagement_index</optionGroupName>
+      </pseudoconstant>
+      <add>3.4</add>
+  </field>
   <field>
       <name>weight</name>
       <type>int</type>
index 0b93e633701585b5eac6732ea3a144a14cb49f7d..adbdc24ef4b6ccbcdcc5690bd835f5cc74cde5c1 100644 (file)
       <default>NULL</default>
       <comment>Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type</comment> 
       <import>true</import>
-      <add>3.3</add>
-  </field>
+      <pseudoconstant>
+        <optionGroupName>campaign_type</optionGroupName>
+      </pseudoconstant>
+      <add>3.3</add> 
+  </field> 
   <index>
       <name>UI_campaign_type_id</name>
       <fieldName>campaign_type_id</fieldName>
@@ -94,6 +97,9 @@
       <default>NULL</default>
       <comment>Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status</comment>
       <import>true</import>
+      <pseudoconstant>
+        <optionGroupName>campaign_status</optionGroupName>
+      </pseudoconstant>
       <add>3.3</add> 
   </field>
   <index>
index 3de0b94e63a40a2cc14b7b29126c7592d829101b..1e8907dc08d307562550b5c78b39b07e93563498 100644 (file)
        <import>true</import>
        <export>false</export>
        <title>Case Type Id</title>
-       <comment>Id of first case category.</comment>
+       <comment>Multivalued pseudo-fk to option_value table where option_group_name = case_type.</comment>
+       <pseudoconstant>
+         <optionGroupName>case_type</optionGroupName>
+       </pseudoconstant>
        <add>2.0</add>
   </field>
   <index>
        <export>false</export>
        <title>Case Status Id</title>
        <comment>Id of case status.</comment>
+       <pseudoconstant>
+         <optionGroupName>case_status</optionGroupName>
+       </pseudoconstant>
        <add>1.8</add>
   </field>
   <field>
index 921b5b0edaa28f55d851c41e5f448f1cdebc3929..06c9be9f6c00acad050983a280099a9acfe2a22b 100644 (file)
@@ -1,51 +1,51 @@
-<?xml version="1.0" encoding="iso-8859-1" ?> 
+<?xml version="1.0" encoding="iso-8859-1" ?>
 
-<table> 
-  <base>CRM/Event</base> 
-  <class>Event</class> 
-  <name>civicrm_event</name> 
-  <add>1.7</add> 
+<table>
+  <base>CRM/Event</base>
+  <class>Event</class>
+  <name>civicrm_event</name>
+  <add>1.7</add>
   <log>true</log>
-  <field> 
-    <name>id</name> 
-    <type>int unsigned</type> 
+  <field>
+    <name>id</name>
+    <type>int unsigned</type>
     <title>Event ID</title>
-    <required>true</required> 
-    <comment>Event</comment>  
-    <add>1.7</add> 
-  </field> 
-  <primaryKey> 
-    <name>id</name> 
-    <autoincrement>true</autoincrement> 
-  </primaryKey> 
-  <field>        
-    <name>title</name>     
+    <required>true</required>
+    <comment>Event</comment>
+    <add>1.7</add>
+  </field>
+  <primaryKey>
+    <name>id</name>
+    <autoincrement>true</autoincrement>
+  </primaryKey>
+  <field>
+    <name>title</name>
     <uniqueName>event_title</uniqueName>
-    <type>varchar</type>     
+    <type>varchar</type>
     <import>true</import>
     <title>Event Title</title>
     <headerPattern>/(event.)?title$/i</headerPattern>
-    <length>255</length>  
+    <length>255</length>
     <localizable>true</localizable>
     <comment>Event Title (e.g. Fall Fundraiser Dinner)</comment>
-    <add>1.7</add>     
-  </field>   
-  <field>        
+    <add>1.7</add>
+  </field>
+  <field>
     <name>summary</name>
-    <type>text</type>     
-    <title>Event Summary</title>  
+    <type>text</type>
+    <title>Event Summary</title>
     <htmlType>textarea</htmlType>
     <rows>4</rows>
     <cols>60</cols>
     <localizable>true</localizable>
     <comment>Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.</comment>
-    <add>1.7</add>     
-  </field>   
-  <field>        
-    <name>description</name>     
-    <type>text</type>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>description</name>
+    <type>text</type>
     <uniqueName>event_description</uniqueName>
-    <title>Event Description</title>  
+    <title>Event Description</title>
     <htmlType>textarea</htmlType>
     <rows>8</rows>
     <cols>60</cols>
     <pseudoconstant>
       <optionGroupName>event_type</optionGroupName>
     </pseudoconstant>
-    <comment>Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.</comment> 
-    <add>1.7</add> 
-  </field> 
+    <comment>Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.</comment>
+    <add>1.7</add>
+  </field>
   <index>
     <name>index_event_type_id</name>
     <fieldName>event_type_id</fieldName>
     <add>1.8</add>
   </index>
-  <field> 
-    <name>participant_listing_id</name> 
-    <type>int unsigned</type> 
+  <field>
+    <name>participant_listing_id</name>
+    <type>int unsigned</type>
     <uniqueName>participant_listing_id</uniqueName>
-    <title>Participant Listing ID</title>  
-    <default>0</default>                
-    <comment>Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.</comment> 
-    <add>2.0</add> 
-  </field> 
+    <title>Participant Listing ID</title>
+    <default>0</default>
+    <comment>Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.</comment>
+    <add>2.0</add>
+  </field>
   <index>
     <name>index_participant_listing_id</name>
     <fieldName>participant_listing_id</fieldName>
     <add>2.0</add>
   </index>
-  <field> 
-    <name>is_public</name> 
-    <type>boolean</type> 
-    <title>Is Event Public</title>  
-    <default>1</default>                
-    <comment>Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.</comment> 
-    <add>1.7</add> 
-  </field> 
+  <field>
+    <name>is_public</name>
+    <type>boolean</type>
+    <title>Is Event Public</title>
+    <default>1</default>
+    <comment>Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.</comment>
+    <add>1.7</add>
+  </field>
   <field>
     <name>start_date</name>
     <type>datetime</type>
     <comment>Date and time that event ends. May be NULL if no defined end date/time</comment>
     <add>1.7</add>
   </field>
-  <field> 
-    <name>is_online_registration</name> 
-    <type>boolean</type> 
+  <field>
+    <name>is_online_registration</name>
+    <type>boolean</type>
     <title>Is Online Registration</title>
-    <default>0</default>                
-    <comment>If true, include registration link on Event Info page.</comment> 
-    <add>1.7</add> 
+    <default>0</default>
+    <comment>If true, include registration link on Event Info page.</comment>
+    <add>1.7</add>
   </field>
-  <field>   
-    <name>registration_link_text</name>     
-    <type>varchar</type>     
+  <field>
+    <name>registration_link_text</name>
+    <type>varchar</type>
     <title>Event Registration Link Text</title>
-    <length>255</length>  
+    <length>255</length>
     <localizable>true</localizable>
     <comment>Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.</comment>
-    <add>1.7</add>     
-  </field>   
+    <add>1.7</add>
+  </field>
   <field>
     <name>registration_start_date</name>
     <type>datetime</type>
     <comment>Date and time that online registration ends.</comment>
     <add>1.8</add>
   </field>
-  <field> 
-    <name>max_participants</name> 
-    <type>int unsigned</type> 
+  <field>
+    <name>max_participants</name>
+    <type>int unsigned</type>
     <title>Max Participants</title>
     <default>NULL</default>
-    <comment>Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.</comment> 
-    <add>1.7</add> 
+    <comment>Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.</comment>
+    <add>1.7</add>
   </field>
-  <field> 
-    <name>event_full_text</name> 
-    <type>text</type> 
+  <field>
+    <name>event_full_text</name>
+    <type>text</type>
     <title>Event Information</title>
     <htmlType>textarea</htmlType>
     <rows>4</rows>
     <cols>60</cols>
     <localizable>true</localizable>
-    <comment>Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.</comment> 
-    <add>1.7</add> 
+    <comment>Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.</comment>
+    <add>1.7</add>
   </field>
-  <field> 
-    <name>is_monetary</name> 
+  <field>
+    <name>is_monetary</name>
     <title>Is this a PAID event?</title>
-    <type>boolean</type> 
-    <default>0</default>                
-    <comment>If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.</comment> 
-    <add>1.7</add> 
-  </field> 
-  <field> 
-    <name>contribution_type_id</name> 
-    <type>int unsigned</type> 
+    <type>boolean</type>
     <default>0</default>
-    <comment>Contribution type assigned to paid event registrations for this event. Required if is_monetary is true.</comment> 
+    <comment>If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>contribution_type_id</name>
+    <type>int unsigned</type>
+    <default>0</default>
+    <comment>Contribution type assigned to paid event registrations for this event. Required if is_monetary is true.</comment>
     <add>1.7</add>
     <drop>4.3</drop>
   </field>
-  <field> 
-    <name>financial_type_id</name> 
-    <type>int unsigned</type> 
+  <field>
+    <name>financial_type_id</name>
+    <type>int unsigned</type>
     <title>Financial Type ID</title>
     <default>NULL</default>
     <comment>Financial type assigned to paid event registrations for this event. Required if is_monetary is true.</comment>
       <keyColumn>id</keyColumn>
       <labelColumn>name</labelColumn>
     </pseudoconstant>
-    <add>4.3</add> 
+    <add>4.3</add>
   </field>
   <field>
     <name>payment_processor</name>
     </pseudoconstant>
     <add>1.8</add>
   </field>
-  <field> 
+  <field>
     <name>is_map</name>
     <title>Map Enabled</title>
-    <type>boolean</type> 
+    <type>boolean</type>
     <default>0</default>
-    <comment>Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?</comment> 
-    <add>1.7</add> 
-  </field> 
+    <comment>Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?</comment>
+    <add>1.7</add>
+  </field>
   <field>
     <name>is_active</name>
     <title>Is Active</title>
     <type>boolean</type>
     <default>0</default>
-    <comment>Is this Event enabled or disabled/cancelled?</comment> 
-    <add>1.7</add> 
+    <comment>Is this Event enabled or disabled/cancelled?</comment>
+    <add>1.7</add>
   </field>
   <field>
     <name>fee_label</name>
     <length>255</length>
     <localizable>true</localizable>
     <add>1.8</add>
-  </field> 
-  <field> 
-    <name>is_show_location</name> 
-    <type>boolean</type> 
+  </field>
+  <field>
+    <name>is_show_location</name>
+    <type>boolean</type>
     <title>show location</title>
-    <default>1</default>                
-    <comment>If true, show event location.</comment> 
-    <add>1.7</add> 
-  </field>   
+    <default>1</default>
+    <comment>If true, show event location.</comment>
+    <add>1.7</add>
+  </field>
   <field>
     <name>loc_block_id</name>
     <type>int unsigned</type>
     <add>2.0</add>
     <drop>2.1</drop>
   </field>
-  <field> 
-    <name>default_role_id</name> 
+  <field>
+    <name>default_role_id</name>
     <uniqueName>default_role_id</uniqueName>
     <title>Participant Role</title>
     <import>true</import>
-    <type>int unsigned</type> 
+    <type>int unsigned</type>
     <default>1</default>
-    <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment> 
-    <add>2.0</add> 
+    <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment>
+    <add>2.0</add>
   </field>
-  <field>        
-    <name>intro_text</name>     
-    <type>text</type>     
+  <field>
+    <name>intro_text</name>
+    <type>text</type>
     <htmlType>textarea</htmlType>
     <rows>6</rows>
     <cols>50</cols>
     <title>Introductory Message</title>
     <localizable>true</localizable>
     <comment>Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.</comment>
-    <add>1.7</add>     
-  </field>   
-  <field>        
-    <name>footer_text</name>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>footer_text</name>
     <title>Footer Message</title>
-    <type>text</type>     
+    <type>text</type>
     <htmlType>textarea</htmlType>
     <rows>6</rows>
     <cols>50</cols>
     <localizable>true</localizable>
     <comment>Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.</comment>
-    <add>1.7</add>     
-  </field>   
-  <field>        
-    <name>confirm_title</name>     
-    <type>varchar</type>   
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_title</name>
+    <type>varchar</type>
     <title>Confirmation Title</title>
-    <length>255</length> 
+    <length>255</length>
     <default>NULL</default>
     <localizable>true</localizable>
     <comment>Title for Confirmation page.</comment>
-    <add>1.7</add>     
-  </field>   
-  <field>        
-    <name>confirm_text</name>     
-    <type>text</type>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_text</name>
+    <type>text</type>
     <htmlType>textarea</htmlType>
     <rows>6</rows>
     <cols>50</cols>
     <title>Confirm Text</title>
     <localizable>true</localizable>
     <comment>Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.</comment>
-    <add>1.7</add>     
-  </field>  
-  <field>        
-    <name>confirm_footer_text</name>     
-    <type>text</type>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_footer_text</name>
+    <type>text</type>
     <title>Footer Text</title>
     <htmlType>textarea</htmlType>
     <rows>6</rows>
     <cols>50</cols>
     <localizable>true</localizable>
     <comment>Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.</comment>
-    <add>1.7</add>     
-  </field> 
-  <field> 
-    <name>is_email_confirm</name> 
-    <type>boolean</type> 
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>is_email_confirm</name>
+    <type>boolean</type>
     <title>Is confirm email</title>
-    <default>0</default>                
-    <comment>If true, confirmation is automatically emailed to contact on successful registration.</comment> 
-    <add>1.7</add> 
-  </field> 
-  <field>        
-    <name>confirm_email_text</name>     
-    <type>text</type>     
+    <default>0</default>
+    <comment>If true, confirmation is automatically emailed to contact on successful registration.</comment>
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_email_text</name>
+    <type>text</type>
     <title>Confirmation Email Text</title>
     <htmlType>textarea</htmlType>
     <rows>4</rows>
     <cols>50</cols>
     <localizable>true</localizable>
     <comment>text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now</comment>
-    <add>1.7</add>     
-  </field> 
-  <field>        
-    <name>confirm_from_name</name>     
-    <type>varchar</type>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>confirm_from_name</name>
+    <type>varchar</type>
     <title>Confirm From Name</title>
-    <length>255</length>  
+    <length>255</length>
     <localizable>true</localizable>
     <comment>FROM email name used for confirmation emails.</comment>
-    <add>1.7</add>     
+    <add>1.7</add>
   </field>
-  <field>        
-    <name>confirm_from_email</name>     
-    <type>varchar</type>     
+  <field>
+    <name>confirm_from_email</name>
+    <type>varchar</type>
     <title>Confirm From Email</title>
-    <length>255</length>  
+    <length>255</length>
     <comment>FROM email address used for confirmation emails.</comment>
-    <add>1.7</add>     
-  </field>     
-  <field>        
-    <name>cc_confirm</name>     
-    <type>varchar</type> 
-    <length>255</length>  
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>cc_confirm</name>
+    <type>varchar</type>
+    <length>255</length>
     <comment>comma-separated list of email addresses to cc each time a confirmation is sent</comment>
-    <add>1.7</add>     
+    <add>1.7</add>
   </field>
-  <field>        
-    <name>bcc_confirm</name>     
-    <type>varchar</type>     
-    <length>255</length>  
+  <field>
+    <name>bcc_confirm</name>
+    <type>varchar</type>
+    <length>255</length>
     <comment>comma-separated list of email addresses to bcc each time a confirmation is sent</comment>
-    <add>1.7</add>     
+    <add>1.7</add>
   </field>
   <field>
     <name>default_fee_id</name>
     <comment>FK to civicrm_option_value.</comment>
     <add>1.7</add>
   </field>
-  <field>        
-    <name>thankyou_title</name>     
-    <type>varchar</type>   
+  <field>
+    <name>thankyou_title</name>
+    <type>varchar</type>
     <title>ThankYou Title</title>
-    <length>255</length> 
+    <length>255</length>
     <default>NULL</default>
     <localizable>true</localizable>
     <comment>Title for ThankYou page.</comment>
-    <add>1.7</add>     
-  </field>   
-  <field>        
-    <name>thankyou_text</name>     
-    <type>text</type>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>thankyou_text</name>
+    <type>text</type>
     <htmlType>textarea</htmlType>
     <rows>6</rows>
     <cols>50</cols>
     <title>ThankYou Text</title>
     <localizable>true</localizable>
     <comment>ThankYou Text.</comment>
-    <add>1.7</add>     
-  </field>  
-  <field>        
-    <name>thankyou_footer_text</name>     
-    <type>text</type>     
+    <add>1.7</add>
+  </field>
+  <field>
+    <name>thankyou_footer_text</name>
+    <type>text</type>
     <title>Footer Text</title>
     <htmlType>textarea</htmlType>
     <rows>6</rows>
     <cols>50</cols>
     <localizable>true</localizable>
     <comment>Footer message.</comment>
-    <add>1.7</add>     
-  </field> 
-  <field>   
+    <add>1.7</add>
+  </field>
+  <field>
     <name>is_pay_later</name>
     <title>Pay Later Allowed</title>
     <type>boolean</type>
     <default>0</default>
-    <comment>if true - allows the user to send payment directly to the org later</comment>   
-    <add>2.0</add>   
+    <comment>if true - allows the user to send payment directly to the org later</comment>
+    <add>2.0</add>
   </field>
-  <field>   
+  <field>
     <name>pay_later_text</name>
     <title>Pay Later Text</title>
     <type>text</type>
     <localizable>true</localizable>
-    <comment>The text displayed to the user in the main form</comment>   
+    <comment>The text displayed to the user in the main form</comment>
     <add>2.0</add>
   </field>
   <field>
     <title>Pay Later Receipt Text</title>
     <type>text</type>
     <localizable>true</localizable>
-    <comment>The receipt sent to the user instead of the normal receipt text</comment>   
+    <comment>The receipt sent to the user instead of the normal receipt text</comment>
     <add>2.0</add>
   </field>
-  <field>   
+  <field>
     <name>is_partial_payment</name>
     <title>Partial Payments Enabled</title>
-    <type>boolean</type> 
-    <default>0</default> 
-    <comment>is partial payment enabled for this event</comment>   
-    <add>4.3</add>   
+    <type>boolean</type>
+    <default>0</default>
+    <comment>is partial payment enabled for this event</comment>
+    <add>4.3</add>
   </field>
-  <field>   
+  <field>
     <name>initial_amount_label</name>
     <title>Initial Amount Label</title>
     <type>varchar</type>
-    <length>255</length> 
+    <length>255</length>
     <localizable>true</localizable>
-    <comment>Initial amount label for partial payment</comment>   
-    <add>4.3</add>   
+    <comment>Initial amount label for partial payment</comment>
+    <add>4.3</add>
   </field>
-  <field>   
+  <field>
     <name>initial_amount_help_text</name>
     <title>Initial Amount Help Text</title>
     <type>text</type>
     <localizable>true</localizable>
-    <comment>Initial amount help text for partial payment</comment>   
-    <add>4.3</add>   
+    <comment>Initial amount help text for partial payment</comment>
+    <add>4.3</add>
   </field>
-  <field>  
+  <field>
     <name>min_initial_amount</name>
     <title>Minimum Initial Amount</title>
     <type>decimal</type>
-    <comment>Minimum initial amount for partial payment</comment>   
-    <add>4.3</add>   
+    <comment>Minimum initial amount for partial payment</comment>
+    <add>4.3</add>
   </field>
-  <field>   
+  <field>
     <name>is_multiple_registrations</name>
     <title>Allow Multiple Registrations</title>
     <type>boolean</type>
     <default>0</default>
-    <comment>if true - allows the user to register multiple participants for event</comment>   
-    <add>2.1</add>   
+    <comment>if true - allows the user to register multiple participants for event</comment>
+    <add>2.1</add>
   </field>
-  <field> 
-    <name>allow_same_participant_emails</name> 
-    <type>boolean</type> 
+  <field>
+    <name>allow_same_participant_emails</name>
+    <type>boolean</type>
     <title>Does Event allow multiple registrations from same email address?</title>
-    <default>0</default>                
-    <comment>if true - allows the user to register multiple registrations from same email address.</comment> 
-    <add>2.2</add> 
-  </field> 
+    <default>0</default>
+    <comment>if true - allows the user to register multiple registrations from same email address.</comment>
+    <add>2.2</add>
+  </field>
   <field>
     <name>has_waitlist</name>
     <title>Waitlist Enabled</title>
     <comment>whether the event has template</comment>
     <add>3.0</add>
   </field>
-  <field>        
-    <name>template_title</name>     
+  <field>
+    <name>template_title</name>
     <uniqueName>template_title</uniqueName>
-    <type>varchar</type>     
+    <type>varchar</type>
     <import>true</import>
     <title>Event Template Title</title>
     <headerPattern>/(template.)?title$/i</headerPattern>
-    <length>255</length>  
+    <length>255</length>
     <localizable>true</localizable>
     <comment>Event Template Title</comment>
-    <add>3.0</add>     
+    <add>3.0</add>
   </field>
   <field>
     <name>created_id</name>
     <comment>Date and time that event was created.</comment>
     <add>3.0</add>
   </field>
-  <field>      
-    <name>currency</name>   
-    <type>varchar</type>   
+  <field>
+    <name>currency</name>
+    <type>varchar</type>
     <length>3</length>
     <import>true</import>
     <headerPattern>/cur(rency)?/i</headerPattern>
     <type>int unsigned</type>
     <title>Campaign ID</title>
     <comment>The campaign for which this event has been created.</comment>
-    <add>3.4</add> 
+    <add>3.4</add>
   </field>
   <foreignKey>
     <name>campaign_id</name>
     <type>boolean</type>
     <default>1</default>
     <comment>Can people share the event through social media?</comment>
-    <add>4.1</add> 
+    <add>4.1</add>
   </field>
   <field>
     <name>parent_event_id</name>
   </index>
   <field>
     <name>slot_label_id</name>
-    <type>int unsigned</type> 
-    <title>Subevent Slot Label ID</title>  
+    <type>int unsigned</type>
+    <title>Subevent Slot Label ID</title>
     <default>NULL</default>
-    <comment>Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.</comment> 
+    <comment>Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.</comment>
     <add>4.1</add>
   </field>
 </table>