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:
parent
a4d540f74b
commit
5f5e1c512c
@ -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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user