mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 20:06:15 +08:00
Load extensions in the configured order
This commit is contained in:
parent
ed23a25f44
commit
da5a97fd36
|
@ -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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user