mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
MDL-61875 core_privacy: update the core_component_list in the manager
This commit is contained in:
parent
5749f8a4f7
commit
6e6ba82305
@ -298,22 +298,9 @@ class manager {
|
||||
* @return array the array of frankenstyle component names.
|
||||
*/
|
||||
protected function get_component_list() {
|
||||
$components = [];
|
||||
// Get all plugins.
|
||||
$plugintypes = \core_component::get_plugin_types();
|
||||
foreach ($plugintypes as $plugintype => $typedir) {
|
||||
$plugins = \core_component::get_plugin_list($plugintype);
|
||||
foreach ($plugins as $pluginname => $plugindir) {
|
||||
$components[] = $plugintype . '_' . $pluginname;
|
||||
}
|
||||
}
|
||||
// Get all subsystems.
|
||||
foreach (\core_component::get_core_subsystems() as $name => $path) {
|
||||
if (isset($path)) {
|
||||
$components[] = 'core_' . $name;
|
||||
}
|
||||
}
|
||||
return $components;
|
||||
return array_keys(array_reduce(\core_component::get_component_list(), function($carry, $item) {
|
||||
return array_merge($carry, $item);
|
||||
}, []));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user