mirror of
https://github.com/flarum/core.git
synced 2025-10-17 01:36:09 +02:00
refactoring to support array closures migrations and fixed issues with previous pr for extension rewriting
This commit is contained in:
committed by
Franz Liedke
parent
2b5dab73f9
commit
e4412178b1
@@ -39,7 +39,7 @@ class Extension implements Arrayable
|
||||
/**
|
||||
* Unique Id of the extension.
|
||||
*
|
||||
* @info Identical to the directory in the extensions directory.
|
||||
* @info Identical to the directory in the extensions directory.
|
||||
* @example flarum_suspend
|
||||
*
|
||||
* @var string
|
||||
@@ -222,6 +222,14 @@ class Extension implements Arrayable
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests whether the extension has assets.
|
||||
*
|
||||
@@ -250,11 +258,11 @@ class Extension implements Arrayable
|
||||
public function toArray()
|
||||
{
|
||||
return (array) array_merge([
|
||||
'id' => $this->getId(),
|
||||
'version' => $this->getVersion(),
|
||||
'path' => $this->path,
|
||||
'icon' => $this->getIcon(),
|
||||
'hasAssets' => $this->hasAssets(),
|
||||
'id' => $this->getId(),
|
||||
'version' => $this->getVersion(),
|
||||
'path' => $this->path,
|
||||
'icon' => $this->getIcon(),
|
||||
'hasAssets' => $this->hasAssets(),
|
||||
'hasMigrations' => $this->hasMigrations(),
|
||||
], $this->composerJson);
|
||||
}
|
||||
|
Reference in New Issue
Block a user