Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACMS-4246: Refactor Acquia Starter Kit Search to work with recipe. #1915

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

rajeshreeputra
Copy link
Contributor

Motivation

Fixes #NNN

Proposed changes

Alternatives considered

Testing steps

Merge requirements

  • Major change, Minor change, Bug, Enhancement, and/or Chore label applied
  • Manual testing by a reviewer

@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 30, 2024 07:06 — with GitHub Actions Inactive
@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 30, 2024 07:37 — with GitHub Actions Inactive
@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 30, 2024 07:56 — with GitHub Actions Inactive
@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 30, 2024 09:51 — with GitHub Actions Inactive
@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 30, 2024 12:13 — with GitHub Actions Inactive
@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 30, 2024 14:00 — with GitHub Actions Inactive
@@ -24,21 +24,16 @@ 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();
$node_types = \Drupal::entityTypeManager()->getStorage('node_type')->loadMultiple();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with below lines

$entity_type_manager = \Drupal::entityTypeManager();
$node_types = $entity_type_manager->getStorage('node_type')->loadMultiple();

$enabled_modules = array_keys($enabled_modules);
_acquia_cms_search_add_category_facet($enabled_modules);
array_walk($node_types, '_acquia_cms_search_import_content_type_views');
$search_category = \Drupal::entityTypeManager()->getStorage('facets_facet')->loadByProperties(['id' => 'search_category']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$search_category = $entity_type_manager->getStorage('facets_facet')->loadByProperties(['id' => 'search_category']);

}

/**
* Implements hook_ENTITY_TYPE_insert() for node types.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong doc comment.

* @return bool
* TRUE if the configuration exists, FALSE otherwise.
*/
function configExists($config_name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method is called only at one instance.. can we directly implement the code block where this method called.
Pros: We can avoid the introducing of new method.

Just a suggestion!!

@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 31, 2024 08:46 — with GitHub Actions Inactive
@rajeshreeputra rajeshreeputra temporarily deployed to acquia_code_deployment December 31, 2024 08:50 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants