From bf2b0f8875d819a23d04fd67148563132e3daa03 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 12 Oct 2022 13:58:18 +0100 Subject: [PATCH] APIv4 - Add titles to PCP and PCPBlock entities --- CRM/PCP/DAO/PCP.php | 11 +++++++++-- CRM/PCP/DAO/PCPBlock.php | 4 ++-- Civi/Api4/PCP.php | 5 ++++- Civi/Api4/PCPBlock.php | 4 +++- xml/schema/PCP/PCP.xml | 2 ++ xml/schema/PCP/PCPBlock.xml | 1 + 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CRM/PCP/DAO/PCP.php b/CRM/PCP/DAO/PCP.php index d5f80f6828..e7e1a6521e 100644 --- a/CRM/PCP/DAO/PCP.php +++ b/CRM/PCP/DAO/PCP.php @@ -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'); } /** diff --git a/CRM/PCP/DAO/PCPBlock.php b/CRM/PCP/DAO/PCPBlock.php index e97bb6d56c..44b2a82ad3 100644 --- a/CRM/PCP/DAO/PCPBlock.php +++ b/CRM/PCP/DAO/PCPBlock.php @@ -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'); } /** diff --git a/Civi/Api4/PCP.php b/Civi/Api4/PCP.php index 626a0cde65..e3ec5427d0 100644 --- a/Civi/Api4/PCP.php +++ b/Civi/Api4/PCP.php @@ -11,8 +11,11 @@ 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 diff --git a/Civi/Api4/PCPBlock.php b/Civi/Api4/PCPBlock.php index e2f45b807f..3ed71d9822 100644 --- a/Civi/Api4/PCPBlock.php +++ b/Civi/Api4/PCPBlock.php @@ -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 diff --git a/xml/schema/PCP/PCP.xml b/xml/schema/PCP/PCP.xml index af8857717a..b6da6a231e 100644 --- a/xml/schema/PCP/PCP.xml +++ b/xml/schema/PCP/PCP.xml @@ -7,6 +7,8 @@ 2.2 true CiviContribute + title + Personal Campaign Page id pcp_id diff --git a/xml/schema/PCP/PCPBlock.xml b/xml/schema/PCP/PCPBlock.xml index 847145c00d..bef7995370 100644 --- a/xml/schema/PCP/PCPBlock.xml +++ b/xml/schema/PCP/PCPBlock.xml @@ -8,6 +8,7 @@ 2.2 true CiviContribute + Personal Campaign Block id PCP Block ID -- 2.25.1