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

Breadcrumb

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

class SearchPlugin

Defines a SearchPlugin type annotation object.

SearchPlugin 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\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
    • class \Drupal\search\Annotation\SearchPlugin extends \Drupal\Component\Annotation\Plugin

Expanded class hierarchy of SearchPlugin

See also

SearchPluginBase

Related topics

Search interface
The Drupal search interface manages a global search mechanism.
Annotations
Annotations for class discovery and metadata description.

File

core/modules/search/src/Annotation/SearchPlugin.php, line 19

Namespace

Drupal\search\Annotation
View source
class SearchPlugin extends Plugin {
    
    /**
     * A unique identifier for the search plugin.
     *
     * @var string
     */
    public $id;
    
    /**
     * The title for the search page tab.
     *
     * @var \Drupal\Core\Annotation\Translation
     *
     * @todo This will potentially be translated twice or cached with the wrong
     *   translation until the search tabs are converted to local task plugins.
     *
     * @ingroup plugin_translatable
     */
    public $title;
    
    /**
     * Whether or not search results should be displayed in admin theme.
     *
     * @var bool
     */
    public $use_admin_theme = FALSE;

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass 1
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider 1
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass 1
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 3
SearchPlugin::$id public property A unique identifier for the search plugin.
SearchPlugin::$title public property The title for the search page tab.
SearchPlugin::$use_admin_theme public property Whether or not search results should be displayed in admin theme.
RSS feed
Powered by Drupal