APIv4 - Add titles to PCP and PCPBlock entities
authorColeman Watts <coleman@civicrm.org>
Wed, 12 Oct 2022 12:58:18 +0000 (13:58 +0100)
committerColeman Watts <coleman@civicrm.org>
Wed, 12 Oct 2022 12:58:18 +0000 (13:58 +0100)
CRM/PCP/DAO/PCP.php
CRM/PCP/DAO/PCPBlock.php
Civi/Api4/PCP.php
Civi/Api4/PCPBlock.php
xml/schema/PCP/PCP.xml
xml/schema/PCP/PCPBlock.xml

index d5f80f68286fba83bbcb9d64ac047c72268460c6..e7e1a6521e756d837bcbce764bc3a2aa05d65397 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/PCP/PCP.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:75a91ef42442db8350a6f4806104cce4)
+ * (GenCodeChecksum:984a6d4632e132247e0df5a4772926f6)
  */
 
 /**
@@ -24,6 +24,13 @@ class CRM_PCP_DAO_PCP extends CRM_Core_DAO {
    */
   public static $_tableName = 'civicrm_pcp';
 
+  /**
+   * Field to show when displaying a record.
+   *
+   * @var string
+   */
+  public static $_labelField = 'title';
+
   /**
    * Should CiviCRM log any modifications to this table in the civicrm_log table.
    *
@@ -176,7 +183,7 @@ class CRM_PCP_DAO_PCP extends CRM_Core_DAO {
    *   Whether to return the plural version of the title.
    */
   public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('PCPs') : ts('PCP');
+    return $plural ? ts('Personal Campaign Pages') : ts('Personal Campaign Page');
   }
 
   /**
index e97bb6d56c2ff21d6bc3e321850049a88aaa73ce..44b2a82ad3200c0cddaf1d178602317d2750b760 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/PCP/PCPBlock.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fc34e59aa9ea5dd0ed465a4e2dbed821)
+ * (GenCodeChecksum:4c2c2836a52f81c10699e8e2ccb578d0)
  */
 
 /**
@@ -161,7 +161,7 @@ class CRM_PCP_DAO_PCPBlock extends CRM_Core_DAO {
    *   Whether to return the plural version of the title.
    */
   public static function getEntityTitle($plural = FALSE) {
-    return $plural ? ts('PCPBlocks') : ts('PCPBlock');
+    return $plural ? ts('Personal Campaign Blocks') : ts('Personal Campaign Block');
   }
 
   /**
index 626a0cde65bb16d2d856dd27b21a5ef40d2a3c26..e3ec5427d0835df9faca2acc60ac6306bc4bbe1b 100644 (file)
 namespace Civi\Api4;
 
 /**
- * PCP entity.
+ * Personal Campaign Pages.
  *
+ * Personalized contribution pages for individuals to fundraise toward a common goal.
+ *
+ * @see https://docs.civicrm.org/user/en/latest/contributions/personal-campaign-pages/
  * @searchable secondary
  * @since 5.42
  * @package Civi\Api4
index e2f45b807f9e68c9465527ceb7f877873f26df52..3ed71d9822e1834d120b1ea99c42c95e2b298c97 100644 (file)
@@ -11,7 +11,9 @@
 namespace Civi\Api4;
 
 /**
- * PCP Block entity.
+ * Persoanl Campaign Page Blocks.
+ *
+ * A Personal Campaign Page Block stores admin configurable status options and rules
  *
  * @searchable secondary
  * @since 5.34
index af8857717ad4eebdc08476bc91d11304dd3f4f2b..b6da6a231e61ae17746ce6a6207ff40c26639f25 100644 (file)
@@ -7,6 +7,8 @@
   <add>2.2</add>
   <log>true</log>
   <component>CiviContribute</component>
+  <labelField>title</labelField>
+  <title>Personal Campaign Page</title>
   <field>
     <name>id</name>
     <uniqueName>pcp_id</uniqueName>
index 847145c00dfe7e02135acf7a06aebf82c5b3242c..bef79953705b73f502b9c8ed1075ee0a3373b7b4 100644 (file)
@@ -8,6 +8,7 @@
   <add>2.2</add>
   <log>true</log>
   <component>CiviContribute</component>
+  <title>Personal Campaign Block</title>
   <field>
     <name>id</name>
     <title>PCP Block ID</title>