vfsStream::
create([ 'modules' =>
[ $module_name =>
[ "
$module_name.info.yml" => <<<YAML
name: CKEditor 5 Test
$module_name
type: module
core_version_requirement: ^9
YAML,
"
$module_name.ckeditor5.yml" =>
$yaml,
] +
$additional_files,
],
],
$this->vfsRoot->
getChild($site_directory));
if (!
empty($additional_files)) { $additional_class_loader =
new ClassLoader();
$additional_class_loader->
addPsr4("Drupal\\
$module_name\\Plugin\\CKEditor5Plugin\\", vfsStream::
url("root/
$site_directory/modules/
$module_name/src/Plugin/CKEditor5Plugin"
));
$additional_class_loader->
register(TRUE
);
} $config_sync = \Drupal::
service('config.storage'
);
$config_data =
$this->
config('core.extension'
)->
get();
$config_data['module'
][$module_name] = 1;
$config_sync->
write('core.extension',
$config_data);