function ContainerFactoryPluginInterface::create

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php \Drupal\Core\Plugin\ContainerFactoryPluginInterface::create()
  2. 8.9.x core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php \Drupal\Core\Plugin\ContainerFactoryPluginInterface::create()
  3. 11.x core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php \Drupal\Core\Plugin\ContainerFactoryPluginInterface::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.

131 methods override ContainerFactoryPluginInterface::create()
AddItemToToolbar::create in core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php
AddModeration::create in core/modules/content_moderation/src/Plugin/ConfigAction/AddModeration.php
Creates an instance of the plugin.
AddToAllBundles::create in core/modules/field/src/Plugin/ConfigAction/AddToAllBundles.php
Creates an instance of the plugin.
AjaxFormBlock::create in core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php
Creates an instance of the plugin.
AnnounceBlock::create in core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php
Creates an instance of the plugin.

... See full list

File

core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php, line 27

Class

ContainerFactoryPluginInterface
Defines an interface for pulling plugin dependencies from the container.

Namespace

Drupal\Core\Plugin

Code

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

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