You are here

public static function ConfigActionsId::create in Config Actions 8

Create a plugin instance from the container

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container:

array $configuration:

string $plugin_id:

mixed $plugin_definition:

Return value

static

Overrides ConfigActionsSourceBase::create

File

src/Plugin/ConfigActionsSource/ConfigActionsId.php, line 98

Class

ConfigActionsId
Plugin for config id from the active store.

Namespace

Drupal\config_actions\Plugin\ConfigActionsSource

Code

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

  /** @var ConfigActionsServiceInterface $config_action_service */
  $config_action_service = $container
    ->get('config_actions');

  /** @var ConfigFactory $config_factory */
  $config_factory = $container
    ->get('config.factory');

  /** @var StorageInterface $config_storage */
  $config_storage = $container
    ->get('config.storage');

  /** @var ConfigManagerInterface $config_manager */
  $config_manager = $container
    ->get('config.manager');

  /** @var MessengerInterface $messenger */
  $messenger = $container
    ->get('messenger');
  return new static($configuration, $plugin_id, $plugin_definition, $config_action_service, $config_factory, $config_storage, $config_manager, $messenger);
}