You are here

public static function Term::create in Term condition 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Condition/Term.php \Drupal\term_condition\Plugin\Condition\Term::create()

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 ContainerFactoryPluginInterface::create

File

src/Plugin/Condition/Term.php, line 62
Contains \Drupal\term_condition\Plugin\Condition\Term.

Class

Term
Provides a 'Term' condition to enable a condition based in module selected status.

Namespace

Drupal\term_condition\Plugin\Condition

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  return new static($container
    ->get('entity_type.manager'), $configuration, $plugin_id, $plugin_definition);
}