You are here

public static function ProcessorPluginBase::create in Search API 8

Creates an instance of the plugin.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Return value

static Returns an instance of this plugin.

Overrides ConfigurablePluginBase::create

8 calls to ProcessorPluginBase::create()
AddHierarchy::create in src/Plugin/search_api/processor/AddHierarchy.php
Creates an instance of the plugin.
ContentAccess::create in src/Plugin/search_api/processor/ContentAccess.php
Creates an instance of the plugin.
FieldsProcessorPluginBase::create in src/Processor/FieldsProcessorPluginBase.php
Creates an instance of the plugin.
LanguageWithFallback::create in src/Plugin/search_api/processor/LanguageWithFallback.php
Creates an instance of the plugin.
RenderedItem::create in src/Plugin/search_api/processor/RenderedItem.php
Creates an instance of the plugin.

... See full list

8 methods override ProcessorPluginBase::create()
AddHierarchy::create in src/Plugin/search_api/processor/AddHierarchy.php
Creates an instance of the plugin.
ContentAccess::create in src/Plugin/search_api/processor/ContentAccess.php
Creates an instance of the plugin.
FieldsProcessorPluginBase::create in src/Processor/FieldsProcessorPluginBase.php
Creates an instance of the plugin.
LanguageWithFallback::create in src/Plugin/search_api/processor/LanguageWithFallback.php
Creates an instance of the plugin.
RenderedItem::create in src/Plugin/search_api/processor/RenderedItem.php
Creates an instance of the plugin.

... See full list

File

src/Processor/ProcessorPluginBase.php, line 64

Class

ProcessorPluginBase
Defines a base class from which other processors may extend.

Namespace

Drupal\search_api\Processor

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {

  /** @var static $processor */
  $processor = parent::create($container, $configuration, $plugin_id, $plugin_definition);
  $processor
    ->setFieldsHelper($container
    ->get('search_api.fields_helper'));
  return $processor;
}