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.

File

drupal/core/includes/config.inc, line 145
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');
  });
}