Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Search.php

class Search

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Render/Element/Search.php \Drupal\Core\Render\Element\Search
  2. 11.1.x core/modules/search/src/Plugin/views/argument/Search.php \Drupal\search\Plugin\views\argument\Search
  3. 11.1.x core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\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\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
    • class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
      • class \Drupal\search\Attribute\Search extends \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of Search

See also

SearchPluginBase

Related topics

Search interface
The Drupal search interface manages a global search mechanism.
4 files declare their use of Search
HelpSearch.php in core/modules/help/src/Plugin/Search/HelpSearch.php
NodeSearch.php in core/modules/node/src/Plugin/Search/NodeSearch.php
SearchPluginManager.php in core/modules/search/src/SearchPluginManager.php
UserSearch.php in core/modules/user/src/Plugin/Search/UserSearch.php
41 string references to 'Search'
AddHandler::buildForm in core/modules/views_ui/src/Form/Ajax/AddHandler.php
Form constructor.
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
block.block.olivero_search_form_narrow.yml in core/themes/olivero/config/optional/block.block.olivero_search_form_narrow.yml
core/themes/olivero/config/optional/block.block.olivero_search_form_narrow.yml
block.block.olivero_search_form_wide.yml in core/themes/olivero/config/optional/block.block.olivero_search_form_wide.yml
core/themes/olivero/config/optional/block.block.olivero_search_form_wide.yml
block.block.umami_search.yml in core/profiles/demo_umami/config/install/block.block.umami_search.yml
core/profiles/demo_umami/config/install/block.block.umami_search.yml

... 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(string $id, ?TranslatableMarkup $title = NULL, bool $use_admin_theme = FALSE, ?string $deriver = NULL) {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::get public function Gets the value of an attribute. Overrides AttributeInterface::get 6
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider
Search::__construct public function Constructs a Search attribute. Overrides Plugin::__construct
RSS feed
Powered by Drupal