class SearchPlugin

Same name in other branches
  1. 9 core/modules/search/src/Annotation/SearchPlugin.php \Drupal\search\Annotation\SearchPlugin
  2. 8.9.x core/modules/search/src/Annotation/SearchPlugin.php \Drupal\search\Annotation\SearchPlugin
  3. 11.x core/modules/search/src/Annotation/SearchPlugin.php \Drupal\search\Annotation\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

Expanded class hierarchy of SearchPlugin

See also

SearchPluginBase

Related topics

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.
     *
     * @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
     *
     * @var \Drupal\Core\Annotation\Translation
     */
    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 Overrides AnnotationInterface::get 6
Plugin::getClass public function Overrides AnnotationInterface::getClass 1
Plugin::getId public function Overrides AnnotationInterface::getId
Plugin::getProvider public function Overrides AnnotationInterface::getProvider 1
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Overrides AnnotationInterface::setClass 1
Plugin::setProvider public function 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.

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