function EntityCreate::create

Same name in other branches
  1. 10 core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php \Drupal\Core\Config\Action\Plugin\ConfigAction\EntityCreate::create()

Overrides ContainerFactoryPluginInterface::create

File

core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php, line 43

Class

EntityCreate
@internal This API is experimental.

Namespace

Drupal\Core\Config\Action\Plugin\ConfigAction

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : static {
    assert(is_array($plugin_definition) && is_array($plugin_definition['constructor_args']), '$plugin_definition contains the expected settings');
    return new static($container->get('config.manager'), ...$plugin_definition['constructor_args']);
}

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