Cleanup labels in LocBlock entity and expose to SearchKit
authorColeman Watts <coleman@civicrm.org>
Thu, 1 Jul 2021 19:52:36 +0000 (15:52 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 1 Jul 2021 21:14:02 +0000 (17:14 -0400)
CRM/Core/DAO/LocBlock.php
Civi/Api4/LocBlock.php
xml/schema/Core/LocBlock.xml

index 4e388f600d003b16e9a45a37e6fb76e5062113a2..32b74aab2c4054b3c508f00859738cea892d2643 100644 (file)
@@ -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',
index 1bb5134ffd8d3d24b30104580f17a58ffe2680a4..41a79885dc3899523f7af099bed28ac5d91df0bc 100644 (file)
@@ -15,7 +15,7 @@ namespace Civi\Api4;
  *
  * Links addresses, emails & phones to Events.
  *
- * @searchable none
+ * @searchable secondary
  * @since 5.31
  * @package Civi\Api4
  */
index 9f92ac3b88bef61e82bf5edc67682a6162c003ab..3f276449378dd5c3136931f86326896d805289dc 100644 (file)
@@ -7,6 +7,8 @@
   <comment>Define location specific properties</comment>
   <add>2.0</add>
   <log>true</log>
+  <title>Location</title>
+  <icon>fa-map-o</icon>
   <field>
     <name>id</name>
     <title>Location Block ID</title>
@@ -75,7 +77,7 @@
     <title>IM ID</title>
     <type>int unsigned</type>
     <html>
-      <label>IM</label>
+      <label>Instant Messenger</label>
     </html>
     <add>2.0</add>
   </field>
   </foreignKey>
   <field>
     <name>address_2_id</name>
-    <title>IM 2 ID</title>
+    <title>Address 2 ID</title>
     <type>int unsigned</type>
     <html>
-      <label>IM 2</label>
+      <label>Address 2</label>
     </html>
     <add>2.0</add>
   </field>
   <field>
     <name>im_2_id</name>
     <type>int unsigned</type>
-    <title>Instant Messenger 2 ID</title>
+    <title>IM 2 ID</title>
     <html>
       <label>Instant Messenger 2</label>
     </html>