function PluginBase::create

Same name and namespace in other branches
  1. 10 core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::create()
  2. 9 core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::create()
  3. 8.9.x core/modules/views/src/Plugin/views/PluginBase.php \Drupal\views\Plugin\views\PluginBase::create()
  4. 11.x core/lib/Drupal/Core/Plugin/PluginBase.php \Drupal\Core\Plugin\PluginBase::create()

Instantiates a new instance of the implementing class using autowiring.

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

See also

\Drupal\Core\Plugin\ContainerFactoryPluginInterface

2 calls to PluginBase::create()
AvifImageEffect::create in core/modules/image/src/Plugin/ImageEffect/AvifImageEffect.php
Instantiates a new instance of the implementing class using autowiring.
WorkspaceSelection::create in core/modules/workspaces/src/Plugin/EntityReferenceSelection/WorkspaceSelection.php
Instantiates a new instance of the implementing class using autowiring.
63 methods override PluginBase::create()
AvifImageEffect::create in core/modules/image/src/Plugin/ImageEffect/AvifImageEffect.php
Instantiates a new instance of the implementing class using autowiring.
BlockedIp::create in core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
Instantiates a new instance of the implementing class using autowiring.
BlockPageVariant::create in core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php
Instantiates a new instance of the implementing class using autowiring.
BlockPluginId::create in core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
Instantiates a new instance of the implementing class using autowiring.
BlockRegion::create in core/modules/block/src/Plugin/migrate/process/BlockRegion.php
Instantiates a new instance of the implementing class using autowiring.

... See full list

File

core/lib/Drupal/Core/Plugin/PluginBase.php, line 40

Class

PluginBase
Base class for plugins supporting metadata inspection and translation.

Namespace

Drupal\Core\Plugin

Code

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

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