Commit 204fc2ef authored by David Suissa's avatar David Suissa
Browse files

Issue #3537721 by dydave: Admin Toolbar Search: Removed dependency on Admin Toolbar Tools.

parent 1e71df02
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,4 +5,4 @@ type: module
core_version_requirement: ^9.5 || ^10 || ^11
configure: admin_toolbar_search.settings
dependencies:
  - admin_toolbar:admin_toolbar_tools
  - admin_toolbar:admin_toolbar
+1 −3
Original line number Diff line number Diff line
@@ -5,9 +5,7 @@ search:
  js:
    js/admin_toolbar_search.js: {}
  dependencies:
    - core/jquery
    - core/drupal
    - core/once
    - admin_toolbar/toolbar.tree
    - core/drupal.autocomplete

search.keyboard_shortcut:
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
/**
 * Class AdminToolbarSearchController to the search functionality.
 *
 * @package Drupal\admin_toolbar_tools\Controller
 * @package Drupal\admin_toolbar_search\Controller
 */
class AdminToolbarSearchController extends ControllerBase {

+6 −0
Original line number Diff line number Diff line
@@ -98,6 +98,12 @@ class SearchLinks {
   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
   */
  public function getLinks() {
    // If the 'admin_toolbar_tools' module is disabled, the following code
    // should not be executed.
    if (!$this->moduleHandler->moduleExists('admin_toolbar_tools')) {
      return [];
    }

    $max_bundle_number = $this->config->get('max_bundle_number');
    $additional_keys = $this->cacheContextManager->convertTokensToKeys([
      'languages:' . LanguageInterface::TYPE_INTERFACE,
+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,9 @@ class AdminToolbarSearchSettingsFormTest extends BrowserTestBase {
    'admin_toolbar_search',
    // Enable the block module to be able to test module's local tasks.
    'block',
    // The admin toolbar tools module is required to check the display of the
    // three menu local tasks (tabs) on the admin settings form page.
    'admin_toolbar_tools',
  ];

  /**