mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 10:04:53 +02:00
fix multiple calls of getCards hook
This commit is contained in:
parent
0b61ae3bdd
commit
4e98b5065b
@ -517,8 +517,11 @@ class PluginExampleExample extends CommonDBTM {
|
||||
}
|
||||
|
||||
|
||||
static function dashboardCards() {
|
||||
return [
|
||||
static function dashboardCards($cards = []) {
|
||||
if (is_null($cards)) {
|
||||
$cards = [];
|
||||
}
|
||||
$new_cards = [
|
||||
'plugin_example_card' => [
|
||||
'widgettype' => ["example"],
|
||||
'label' => __("Plugin Example card"),
|
||||
@ -534,6 +537,8 @@ class PluginExampleExample extends CommonDBTM {
|
||||
'provider' => "PluginExampleExample::cardBigNumberProvider",
|
||||
],
|
||||
];
|
||||
|
||||
return array_merge($cards, $new_cards);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user