No need for menuItem signal now

This commit is contained in:
bohwaz 2023-09-13 15:24:46 +02:00
parent c4d9b8d38b
commit ac8c79bf9e
4 changed files with 5 additions and 10 deletions

View File

@ -6,5 +6,3 @@ use Paheko\Plugin\Facturation\Facture;
$db = DB::getInstance();
$db->import(dirname(__FILE__) . "/data/schema.sql");
$plugin->registerSignal('menu.item', [Facture::class, 'menuItem']);

View File

@ -523,9 +523,4 @@ class Facture
{
return DB::getInstance()->delete('plugin_facturation_factures', 'id = '. (int)$id);
}
public static function menuItem(array $params, array &$list): void
{
$list['plugin_facturation'] = sprintf('<a href="%sp/facturation/">Facturation</a>', \Paheko\ADMIN_URL);
}
}

View File

@ -2,6 +2,8 @@ name="Facturation"
description="Permet d'éditer des factures, devis et reçus à ses membres ainsi qu'à une base de clients supplémentaire."
author="zou"
url="https://gitlab.com/noizette/garradin-plugin-facturation/"
version="0.8.0"
version="0.8.1"
menu=true
restrict_section="accounting"
restrict_level="read"
min_version="1.2.0"

View File

@ -201,7 +201,7 @@ if (version_compare($version, '0.7.1', '<'))
}
// 0.7.4 - Signal menu item
if (version_compare($version, '0.7.4', '<'))
if (version_compare($version, '0.8.1', '<'))
{
$plugin->registerSignal('menu.item', [Facture::class, 'menuItem']);
$plugin->unregisterSignal('menu.item');
}