function config_get_module_config_entities

Return a list of all config entity types provided by a module.

Parameters

string $module: The name of the module possibly providing config entities.

Return value

array An associative array containing the entity info for any config entities provided by the requested module, keyed by the entity type.

2 calls to config_get_module_config_entities()
config_install_default_config in drupal/core/includes/config.inc
Installs the default configuration of a given extension.
config_uninstall_default_config in drupal/core/includes/config.inc
Uninstalls the default configuration of a given extension.

File

drupal/core/includes/config.inc, line 289
This is the API for configuration storage.

Code

function config_get_module_config_entities($module) {

  // While this is a lot of work to generate, it's not worth static caching
  // since this function is only called at install/uninstall, and only
  // once per module.
  $info = entity_get_info();
  return array_filter($info, function ($entity_info) use ($module) {
    return $entity_info['module'] == $module && is_subclass_of($entity_info['class'], 'Drupal\\Core\\Config\\Entity\\ConfigEntityInterface');
  });
}