mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 11:31:27 +08:00
Load extensions in the configured order
This commit is contained in:
parent
a4d540f74b
commit
5f5e1c512c
@ -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…
x
Reference in New Issue
Block a user