Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b223bd3
ACMS-4246: Refactor Acquia Starter Kit Search to work with recipe.
rajeshreeputra Dec 27, 2024
2b7254e
ACMS-4246: Update third party settings for content types modules.
rajeshreeputra Dec 30, 2024
808faf7
ACMS-4246: Add field storage schema in search for content types.
rajeshreeputra Dec 30, 2024
c56f7b1
ACMS-4246: Move search view for content to search.
rajeshreeputra Dec 30, 2024
07c54bd
ACMS-4246: Add helper method to import view on node type creation and…
rajeshreeputra Dec 30, 2024
6e35b1f
ACMS-4246: Add the dependency check for view config import.
rajeshreeputra Dec 30, 2024
1364486
ACMS-4246: Update search config to work with recipes.
rajeshreeputra Dec 30, 2024
cf567b6
ACMS-4246: Move MainListingPagesView to search from common.
rajeshreeputra Dec 31, 2024
f15247a
ACMS-4246: Add helper method to import view on fallback view creation.
rajeshreeputra Dec 31, 2024
a8ff9f0
ACMS-4403: Add event subscriber to import config from recipes.
rajeshreeputra Jan 14, 2025
e5f4bd6
ACMS-4403: Remove unused content type related search view import logic.
rajeshreeputra Jan 14, 2025
45fa3a7
ACMS-4403: Revert the block config updated as per olivero theme.
rajeshreeputra Jan 14, 2025
452d5e5
ACMS-4403: Add filter to import search related config for content rec…
rajeshreeputra Jan 14, 2025
a7b21a8
ACMS-4403: Restore the remove search views in content types modules.
rajeshreeputra Jan 15, 2025
5a4581d
ACMS-4403: Restore the search config changes.
rajeshreeputra Jan 15, 2025
d37b639
ACMS-4237: Add patch for site studio drupal 11.1 compatibility.
rajeshreeputra Jan 9, 2025
0b0b56e
ACMS-4403: Remove common from search test and add search schema in co…
rajeshreeputra Jan 15, 2025
15030d9
ACMS-4403: Update logic to generate search_category facet when field_…
rajeshreeputra Jan 15, 2025
d7ebf40
ACMS-000: Remove site studio D11 compatibility patch. (#1927)
rajeshreeputra Feb 10, 2025
5a5e24b
Better organized.
vishalkhode1 Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_article
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Article Type'
id: node.field_article_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
module:
- acquia_cms_article
third_party_settings:
acquia_cms_search:
search_index: content
acquia_cms_common:
workflow_id: editorial
workbench_email_templates:
Expand All @@ -18,7 +20,6 @@ third_party_settings:
open_graph: open_graph
schema_article: schema_article
twitter_cards: twitter_cards
search_index: content
subtype:
field: field_article_type
facet: articles_article_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies:
- search_api.index.content
- views.view.articles_fallback
module:
- acquia_cms_common
- acquia_cms_search
- search_api
- user
Expand Down
17 changes: 0 additions & 17 deletions modules/acquia_cms_common/acquia_cms_common.module
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,6 @@ function acquia_cms_common_form_alter(&$form, FormStateInterface $form_state, $f
}
}

/**
* Implements hook_views_data().
*/
function acquia_cms_common_views_data() {
return [
'views' => [
'main_listing_pages_view' => [
'title' => t('Main listing pages - Text area'),
'help' => t('Insert a text area inside a main view listing pages if the search server is available. If the view is not based on a Search API index, this behaves like a standard text area.'),
'area' => [
'id' => 'main_listing_pages_view',
],
],
],
];
}

/**
* Implements hook_theme().
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
- node
- taxonomy
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: Categories
id: node.field_categories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,19 @@ node.type.*.third_party.acquia_cms_common:
type: string
label: 'Machine name of the sitemap variant where the content type will be added'

field.storage.*.*.third_party.acquia_cms_common:
acquia_cms_common.settings:
type: config_object
label: 'Acquia CMS settings'
mapping:
user_login_redirection:
type: boolean
label: 'Enable special redirection on user login for specific roles'
starter_kit_name:
type: string
label: 'The starterkit name'

# This is added to make test pass.
field.storage.*.*.third_party.acquia_cms_search:
type: mapping
label: 'Acquia CMS settings'
mapping:
Expand All @@ -52,14 +64,3 @@ field.storage.*.*.third_party.acquia_cms_common:
search_label:
type: string
label: 'The label of the field in the Search API index'

acquia_cms_common.settings:
type: config_object
label: 'Acquia CMS settings'
mapping:
user_login_redirection:
type: boolean
label: 'Enable special redirection on user login for specific roles'
starter_kit_name:
type: string
label: 'The starterkit name'
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_event
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Door Time'
id: node.field_door_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
module:
- acquia_cms_event
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Event Duration'
id: node.field_event_duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_event
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Event End Date'
id: node.field_event_end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_event
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Event Start Date'
id: node.field_event_start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_event
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Event Type'
id: node.field_event_type
Expand Down
3 changes: 2 additions & 1 deletion modules/acquia_cms_event/config/optional/node.type.event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
module:
- acquia_cms_event
third_party_settings:
acquia_cms_search:
search_index: content
acquia_cms_common:
workflow_id: editorial
workbench_email_templates:
Expand All @@ -22,7 +24,6 @@ third_party_settings:
field: field_event_type
facet: events_event_type
sitemap_variant: default
search_index: content
menu_ui:
available_menus:
- main
Expand Down
3 changes: 2 additions & 1 deletion modules/acquia_cms_page/config/optional/node.type.page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ dependencies:
module:
- acquia_cms_page
third_party_settings:
acquia_cms_search:
search_index: content
acquia_cms_common:
workflow_id: editorial
workbench_email_templates:
Expand All @@ -23,7 +25,6 @@ third_party_settings:
schema_article: schema_article
twitter_cards: twitter_cards
sitemap_variant: default
search_index: content
menu_ui:
available_menus:
- main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
module:
- acquia_cms_person
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: Email
id: node.field_email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
module:
- acquia_cms_person
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: Job Title
id: node.field_job_title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_person
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Person Telephone'
id: node.field_person_telephone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_person
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Person Type'
id: node.field_person_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
module:
- acquia_cms_person
third_party_settings:
acquia_cms_search:
search_index: content
acquia_cms_common:
workflow_id: editorial
workbench_email_templates:
Expand All @@ -22,7 +24,6 @@ third_party_settings:
field: field_person_type
facet: people_person_type
sitemap_variant: default
search_index: content
menu_ui:
available_menus:
- main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_place
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Place Address'
id: node.field_place_address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_place
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Place Telephone'
id: node.field_place_telephone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
module:
- acquia_cms_place
third_party_settings:
acquia_cms_common:
acquia_cms_search:
search_index: content
search_label: 'Place Type'
id: node.field_place_type
Expand Down
3 changes: 2 additions & 1 deletion modules/acquia_cms_place/config/optional/node.type.place.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
module:
- acquia_cms_place
third_party_settings:
acquia_cms_search:
search_index: content
acquia_cms_common:
workflow_id: editorial
workbench_email_templates:
Expand All @@ -22,7 +24,6 @@ third_party_settings:
field: field_place_type
facet: places_place_type
sitemap_variant: default
search_index: content
menu_ui:
available_menus:
- main
Expand Down
1 change: 0 additions & 1 deletion modules/acquia_cms_search/acquia_cms_search.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ description: "Provides powerful search capabilities to the site"
type: module
core_version_requirement: ^10.1 || ^11
dependencies:
- acquia_cms_common:acquia_cms_common
- collapsiblock:collapsiblock
- facets:facets
- facets_pretty_paths:facets_pretty_paths
Expand Down
27 changes: 16 additions & 11 deletions modules/acquia_cms_search/acquia_cms_search.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Contains installation routines for Acquia CMS Search.
*/

use Drupal\acquia_cms_search\Facade\FacetFacade;
use Drupal\node\Entity\NodeType;

/**
Expand All @@ -24,19 +25,23 @@ function acquia_cms_search_install($is_syncing) {

// Retroactively enable indexing for any content types that existed before
// this module was installed.
$node_types = NodeType::loadMultiple();
$entity_type_manager = \Drupal::entityTypeManager();
$node_types = $entity_type_manager->getStorage('node_type')->loadMultiple();
array_walk($node_types, 'acquia_cms_search_node_type_insert');
$enabled_modules = \Drupal::service('module_handler')->getModuleList();
$enabled_modules = array_keys($enabled_modules);
_acquia_cms_search_add_category_facet($enabled_modules);
}
}

/**
* Implements hook_module_preinstall().
*/
function acquia_cms_search_module_preinstall($module) {
\Drupal::service('acquia_cms_common.utility')->setModulePreinstallTriggered($module);
// Add the Search Category facet if the field exists.
$field_storage = $entity_type_manager->getStorage('field_storage_config')
->loadByProperties(['field_name' => 'field_categories']);
if ($field_storage) {
\Drupal::classResolver(FacetFacade::class)->addFacet([
'id' => 'search_category',
'name' => 'Category',
'url_alias' => 'category',
'field_identifier' => 'field_categories',
]);
}

}
}

/**
Expand Down
Loading
Loading