You are here

public static function SnowballStemmer::create in Snowball Stemmer 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/search_api/processor/SnowballStemmer.php \Drupal\snowball_stemmer\Plugin\search_api\processor\SnowballStemmer::create()

File

src/Plugin/search_api/processor/SnowballStemmer.php, line 44

Class

SnowballStemmer
Stems search terms.

Namespace

Drupal\snowball_stemmer\Plugin\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
    ->setStemmer($container
    ->get('snowball_stemmer.stemmer'));
  $processor
    ->setLanguageManager($container
    ->get('language_manager'));
  return $processor;
}