1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 13:10:24 +02:00

Load extensions in the configured order

This commit is contained in:
Toby Zerner
2018-10-20 22:21:39 +10:30
parent ed23a25f44
commit da5a97fd36

View File

@@ -266,11 +266,15 @@ class ExtensionManager
/**
* Get only enabled extensions.
*
* @return Collection
* @return array
*/
public function getEnabledExtensions()
{
return $this->getExtensions()->only($this->getEnabled());
$extensions = $this->getExtensions();
return array_filter(array_map(function ($id) use ($extensions) {
return $extensions[$id] ?? null;
}, $this->getEnabled()));
}
/**