human friendly name for bundles (#1491)

This commit is contained in:
Kevin Papst
2020-02-22 22:56:37 +01:00
committed by GitHub
parent 6c7477f1a9
commit 0e507804b1
7 changed files with 52 additions and 41 deletions

View File

@@ -71,6 +71,7 @@ class PluginManager
{
$plugin = new Plugin();
$plugin
->setId($bundle->getName())
->setName($bundle->getName())
->setPath($bundle->getPath())
->setMetadata(new PluginMetadata())
@@ -100,6 +101,10 @@ class PluginManager
$homepage = $json['homepage'] ?? Constants::HOMEPAGE . '/store/';
if (array_key_exists('name', $json['extra']['kimai'])) {
$plugin->setName($json['extra']['kimai']['name']);
}
$plugin
->getMetadata()
->setHomepage($homepage)