You are here

public static function ViewsSynonymsEntityArgumentValidator::create in Synonyms 8

Same name and namespace in other branches
  1. 2.0.x modules/synonyms_views_argument_validator/src/Plugin/Derivative/ViewsSynonymsEntityArgumentValidator.php \Drupal\synonyms_views_argument_validator\Plugin\Derivative\ViewsSynonymsEntityArgumentValidator::create()

Creates a new class instance.

Parameters

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

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

synonyms_views_argument_validator/src/Plugin/Derivative/ViewsSynonymsEntityArgumentValidator.php, line 46

Class

ViewsSynonymsEntityArgumentValidator
Provides synonyms views argument validator for all entity types.

Namespace

Drupal\synonyms_views_argument_validator\Plugin\Derivative

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  return new static($base_plugin_id, $container
    ->get('entity_type.manager'), $container
    ->get('string_translation'));
}