protected static function InstallablePluginBase::createConfig in Markdown 8.2
1 call to InstallablePluginBase::createConfig()
- InstallablePluginBase::setConfiguration in src/
Plugin/ Markdown/ InstallablePluginBase.php - Sets the configuration for this plugin instance.
File
- src/
Plugin/ Markdown/ InstallablePluginBase.php, line 387
Class
- InstallablePluginBase
- Base class for installable plugins.
Namespace
Drupal\markdown\Plugin\MarkdownCode
protected static function createConfig($name, array $data = [], $immutable = TRUE, ContainerInterface $container = NULL) {
$class = $immutable ? ImmutableConfig::class : Config::class;
if (!$container) {
$container = \Drupal::getContainer();
}
$config = new $class($name, $container
->get('config.storage'), $container
->get('event_dispatcher'), $container
->get('config.typed'));
$config
->initWithData($data);
return $config;
}