From e0b7f9a8aae151073d546e23824b70b60eaf0ff7 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 15 Nov 2021 09:47:08 -0500 Subject: [PATCH] SearchKit - Allow searches of OptionGroups and OptionValues Marks the entities searchable, and adds view/edit links for OptionValues --- CRM/Core/DAO/OptionValue.php | 12 +++++++++++- Civi/Api4/OptionGroup.php | 2 +- Civi/Api4/OptionValue.php | 2 +- xml/schema/Core/OptionValue.xml | 4 ++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CRM/Core/DAO/OptionValue.php b/CRM/Core/DAO/OptionValue.php index 32e90f667e..f1a2b41164 100644 --- a/CRM/Core/DAO/OptionValue.php +++ b/CRM/Core/DAO/OptionValue.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/OptionValue.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:171565168517add49222893871a84e43) + * (GenCodeChecksum:598cce8df447dc19cd4c846549be1141) */ /** @@ -30,6 +30,16 @@ class CRM_Core_DAO_OptionValue extends CRM_Core_DAO { */ public static $_log = TRUE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'update' => 'civicrm/admin/options/[option_group_id:name]?reset=1&action=update&id=[id]', + 'delete' => 'civicrm/admin/options/[option_group_id:name]?reset=1&action=delete&id=[id]', + ]; + /** * Option ID * diff --git a/Civi/Api4/OptionGroup.php b/Civi/Api4/OptionGroup.php index fa4f11c66f..1957b840f8 100644 --- a/Civi/Api4/OptionGroup.php +++ b/Civi/Api4/OptionGroup.php @@ -14,7 +14,7 @@ namespace Civi\Api4; * OptionGroup entity. * * @see \Civi\Api4\OptionValue - * @searchable none + * @searchable secondary * @since 5.19 * @package Civi\Api4 */ diff --git a/Civi/Api4/OptionValue.php b/Civi/Api4/OptionValue.php index 8c42cbf046..0b62c189b5 100644 --- a/Civi/Api4/OptionValue.php +++ b/Civi/Api4/OptionValue.php @@ -14,7 +14,7 @@ namespace Civi\Api4; * OptionValue entity. * * @see \Civi\Api4\OptionGroup - * @searchable none + * @searchable secondary * @since 5.19 * @package Civi\Api4 */ diff --git a/xml/schema/Core/OptionValue.xml b/xml/schema/Core/OptionValue.xml index 275a403616..6498b64275 100644 --- a/xml/schema/Core/OptionValue.xml +++ b/xml/schema/Core/OptionValue.xml @@ -6,6 +6,10 @@ civicrm_option_value 1.5 true + + civicrm/admin/options/[option_group_id:name]?reset=1&action=update&id=[id] + civicrm/admin/options/[option_group_id:name]?reset=1&action=delete&id=[id] + id Option Value ID -- 2.25.1