interface ContainerFactoryPluginInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php \Drupal\Core\Plugin\ContainerFactoryPluginInterface
  2. 8.9.x core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php \Drupal\Core\Plugin\ContainerFactoryPluginInterface
  3. 11.x core/lib/Drupal/Core/Plugin/ContainerFactoryPluginInterface.php \Drupal\Core\Plugin\ContainerFactoryPluginInterface

Defines an interface for pulling plugin dependencies from the container.

Hierarchy

Expanded class hierarchy of ContainerFactoryPluginInterface

All classes that implement ContainerFactoryPluginInterface

146 files declare their use of ContainerFactoryPluginInterface
AddItemToToolbar.php in core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemToToolbar.php
AddModeration.php in core/modules/content_moderation/src/Plugin/ConfigAction/AddModeration.php
AddToAllBundles.php in core/modules/field/src/Plugin/ConfigAction/AddToAllBundles.php
AjaxFormBlock.php in core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php
AnnounceBlock.php in core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php

... See full list

File

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

Namespace

Drupal\Core\Plugin
View source
interface ContainerFactoryPluginInterface {
    
    /**
     * Creates an instance of the plugin.
     *
     * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
     *   The container to pull out services used in the plugin.
     * @param array $configuration
     *   A configuration array containing information about the plugin instance.
     * @param string $plugin_id
     *   The plugin ID for the plugin instance.
     * @param mixed $plugin_definition
     *   The plugin implementation definition.
     *
     * @return static
     *   Returns an instance of this plugin.
     */
    public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 131

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