function AddComponent::create

Overrides ContainerFactoryPluginInterface::create

File

core/modules/layout_builder/src/Plugin/ConfigAction/AddComponent.php, line 75

Class

AddComponent
Adds a component to a layout builder section.

Namespace

Drupal\layout_builder\Plugin\ConfigAction

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : static {
    assert(is_array($plugin_definition));
    return new static($container->get(ConfigManagerInterface::class), $container->get(UuidInterface::class), $plugin_id);
}

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