1
0
mirror of https://github.com/flarum/core.git synced 2025-05-09 08:55:25 +02:00

Load extensions in the configured order

This commit is contained in:
Toby Zerner 2018-10-20 22:21:39 +10:30
parent a4d540f74b
commit 5f5e1c512c

View File

@ -266,11 +266,15 @@ class ExtensionManager
/** /**
* Get only enabled extensions. * Get only enabled extensions.
* *
* @return Collection * @return array
*/ */
public function getEnabledExtensions() 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()));
} }
/** /**