From 9f1c07d2bfbcc2164ec522a428b9d4231e35592a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 28 Jun 2022 11:32:34 -0400 Subject: [PATCH] SearchKit - Switch to APIv4 for managed search_display_type option group --- .../managed/SearchDisplayType.mgd.php | 101 ++++++++++++++---- 1 file changed, 83 insertions(+), 18 deletions(-) diff --git a/ext/search_kit/managed/SearchDisplayType.mgd.php b/ext/search_kit/managed/SearchDisplayType.mgd.php index 6feee2ef47..94d55fdf13 100644 --- a/ext/search_kit/managed/SearchDisplayType.mgd.php +++ b/ext/search_kit/managed/SearchDisplayType.mgd.php @@ -8,42 +8,107 @@ return [ 'update' => 'always', 'cleanup' => 'always', 'params' => [ - 'name' => 'search_display_type', - 'title' => 'Search Display Type', - 'option_value_fields' => ['name', 'label', 'icon', 'description'], + 'version' => 4, + 'values' => [ + 'name' => 'search_display_type', + 'title' => 'Search Display Type', + 'description' => NULL, + 'data_type' => NULL, + 'is_reserved' => TRUE, + 'is_active' => TRUE, + 'is_locked' => FALSE, + 'option_value_fields' => [ + 'name', + 'label', + 'icon', + 'description', + ], + ], + 'match' => ['name'], ], ], [ 'name' => 'SearchDisplayType:table', 'entity' => 'OptionValue', + 'cleanup' => 'always', + 'update' => 'always', 'params' => [ - 'option_group_id' => 'search_display_type', - 'value' => 'table', - 'name' => 'crm-search-display-table', - 'label' => 'Table', - 'icon' => 'fa-table', + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'search_display_type', + 'value' => 'table', + 'name' => 'crm-search-display-table', + 'label' => 'Table', + 'icon' => 'fa-table', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + 'match' => ['option_group_id', 'name'], ], ], [ 'name' => 'SearchDisplayType:list', 'entity' => 'OptionValue', + 'cleanup' => 'always', + 'update' => 'always', 'params' => [ - 'option_group_id' => 'search_display_type', - 'value' => 'list', - 'name' => 'crm-search-display-list', - 'label' => 'List', - 'icon' => 'fa-list', + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'search_display_type', + 'value' => 'list', + 'name' => 'crm-search-display-list', + 'label' => 'List', + 'icon' => 'fa-list', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + 'match' => ['option_group_id', 'name'], ], ], [ 'name' => 'SearchDisplayType:grid', 'entity' => 'OptionValue', + 'cleanup' => 'always', + 'update' => 'always', 'params' => [ - 'option_group_id' => 'search_display_type', - 'value' => 'grid', - 'name' => 'crm-search-display-grid', - 'label' => 'Grid', - 'icon' => 'fa-th', + 'version' => 4, + 'values' => [ + 'option_group_id.name' => 'search_display_type', + 'value' => 'grid', + 'name' => 'crm-search-display-grid', + 'label' => 'Grid', + 'icon' => 'fa-th', + 'grouping' => NULL, + 'filter' => 0, + 'is_default' => FALSE, + 'description' => NULL, + 'is_optgroup' => FALSE, + 'is_reserved' => FALSE, + 'is_active' => TRUE, + 'color' => NULL, + 'component_id' => NULL, + 'domain_id' => NULL, + 'visibility_id' => NULL, + ], + 'match' => ['option_group_id', 'name'], ], ], ]; -- 2.25.1