From 77af2b9164d887b39f6472b9af68f068bcebd746 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 1 Jul 2021 15:52:36 -0400 Subject: [PATCH] Cleanup labels in LocBlock entity and expose to SearchKit --- CRM/Core/DAO/LocBlock.php | 19 +++++++++++++------ Civi/Api4/LocBlock.php | 2 +- xml/schema/Core/LocBlock.xml | 10 ++++++---- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CRM/Core/DAO/LocBlock.php b/CRM/Core/DAO/LocBlock.php index 4e388f600d..32b74aab2c 100644 --- a/CRM/Core/DAO/LocBlock.php +++ b/CRM/Core/DAO/LocBlock.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/LocBlock.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:8b7812b634efd7d94dfe689a0d45d12b) + * (GenCodeChecksum:0da5161ce83d29bc7626c1a3b74b2950) */ /** @@ -23,6 +23,13 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { */ public static $_tableName = 'civicrm_loc_block'; + /** + * Icon associated with this entity. + * + * @var string + */ + public static $_icon = 'fa-map-o'; + /** * Should CiviCRM log any modifications to this table in the civicrm_log table. * @@ -92,7 +99,7 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { * Whether to return the plural version of the title. */ public static function getEntityTitle($plural = FALSE) { - return $plural ? ts('Loc Blocks') : ts('Loc Block'); + return $plural ? ts('Locations') : ts('Location'); } /** @@ -198,14 +205,14 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { 'localizable' => 0, 'FKClassName' => 'CRM_Core_DAO_IM', 'html' => [ - 'label' => ts("IM"), + 'label' => ts("Instant Messenger"), ], 'add' => '2.0', ], 'address_2_id' => [ 'name' => 'address_2_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('IM 2 ID'), + 'title' => ts('Address 2 ID'), 'where' => 'civicrm_loc_block.address_2_id', 'table_name' => 'civicrm_loc_block', 'entity' => 'LocBlock', @@ -213,7 +220,7 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { 'localizable' => 0, 'FKClassName' => 'CRM_Core_DAO_Address', 'html' => [ - 'label' => ts("IM 2"), + 'label' => ts("Address 2"), ], 'add' => '2.0', ], @@ -250,7 +257,7 @@ class CRM_Core_DAO_LocBlock extends CRM_Core_DAO { 'im_2_id' => [ 'name' => 'im_2_id', 'type' => CRM_Utils_Type::T_INT, - 'title' => ts('Instant Messenger 2 ID'), + 'title' => ts('IM 2 ID'), 'where' => 'civicrm_loc_block.im_2_id', 'table_name' => 'civicrm_loc_block', 'entity' => 'LocBlock', diff --git a/Civi/Api4/LocBlock.php b/Civi/Api4/LocBlock.php index 1bb5134ffd..41a79885dc 100644 --- a/Civi/Api4/LocBlock.php +++ b/Civi/Api4/LocBlock.php @@ -15,7 +15,7 @@ namespace Civi\Api4; * * Links addresses, emails & phones to Events. * - * @searchable none + * @searchable secondary * @since 5.31 * @package Civi\Api4 */ diff --git a/xml/schema/Core/LocBlock.xml b/xml/schema/Core/LocBlock.xml index 9f92ac3b88..3f27644937 100644 --- a/xml/schema/Core/LocBlock.xml +++ b/xml/schema/Core/LocBlock.xml @@ -7,6 +7,8 @@ Define location specific properties 2.0 true + Location + fa-map-o id Location Block ID @@ -75,7 +77,7 @@ IM ID int unsigned - + 2.0 @@ -88,10 +90,10 @@ address_2_id - IM 2 ID + Address 2 ID int unsigned - + 2.0 @@ -137,7 +139,7 @@ im_2_id int unsigned - Instant Messenger 2 ID + IM 2 ID -- 2.25.1