function SearchPluginBase::create

Same name in other branches
  1. 9 core/modules/search/src/Plugin/SearchPluginBase.php \Drupal\search\Plugin\SearchPluginBase::create()
  2. 8.9.x core/modules/search/src/Plugin/SearchPluginBase.php \Drupal\search\Plugin\SearchPluginBase::create()
  3. 11.x core/modules/search/src/Plugin/SearchPluginBase.php \Drupal\search\Plugin\SearchPluginBase::create()

Overrides ContainerFactoryPluginInterface::create

3 methods override SearchPluginBase::create()
HelpSearch::create in core/modules/help/src/Plugin/Search/HelpSearch.php
Creates an instance of the plugin.
NodeSearch::create in core/modules/node/src/Plugin/Search/NodeSearch.php
Creates an instance of the plugin.
UserSearch::create in core/modules/user/src/Plugin/Search/UserSearch.php
Creates an instance of the plugin.

File

core/modules/search/src/Plugin/SearchPluginBase.php, line 44

Class

SearchPluginBase
Defines a base class for plugins wishing to support search.

Namespace

Drupal\search\Plugin

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition);
}

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