class Search

Same name and namespace in other branches
  1. 11.x core/modules/search/src/Attribute/Search.php \Drupal\search\Attribute\Search

Defines a Search type attribute for plugin discovery.

Search classes define search types for the core Search module. Each search type can be used to create search pages from the Search settings page.

Hierarchy

  • class \Drupal\search\Attribute\Search implements \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of Search

See also

SearchPluginBase

1 file declares its use of Search
HelpSearch.php in core/modules/help/src/Plugin/Search/HelpSearch.php
9 string references to 'Search'
block.block.claro_help_search.yml in core/modules/help/config/optional/block.block.claro_help_search.yml
core/modules/help/config/optional/block.block.claro_help_search.yml
HelpTopicSearchTest::setUp in core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
HelpTopicSearchTest::testHelpSearch in core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
Tests help topic search.
HelpTopicSearchTest::testUninstallSearch in core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
Tests uninstalling the search module.
help_post_update_help_topics_search in core/modules/help/help.post_update.php
Install or update config for help topics if the search module installed.

... See full list

File

core/modules/search/src/Attribute/Search.php, line 18

Namespace

Drupal\search\Attribute
View source
class Search extends Plugin {
  
  /**
   * Constructs a Search attribute.
   *
   * @param string $id
   *   The plugin ID.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $title
   *   The title for the search page tab.
   * @param bool $use_admin_theme
   *   Whether search results should be displayed in admin theme or not.
   * @param class-string|null $deriver
   *   (optional) The deriver class.
   */
  public function __construct(public readonly string $id, public readonly ?TranslatableMarkup $title = NULL, public readonly bool $use_admin_theme = FALSE, public readonly ?string $deriver = NULL) {
  }

}

Members

Title Sort descending Modifiers Object type Summary
Search::__construct public function Constructs a Search attribute.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.