Add new menu item call
This commit is contained in:
parent
b74226871e
commit
97404460ee
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Garradin;
|
||||
use Garradin\Entities\Files\File;
|
||||
use Garradin\Plugin\Facturation\Facture;
|
||||
|
||||
$db = DB::getInstance();
|
||||
|
||||
@ -8,3 +9,5 @@ $db->import(dirname(__FILE__) . "/data/schema.sql");
|
||||
|
||||
$path = __DIR__.'/data/default_sign.png';
|
||||
$png = (new File)->createAndStore('skel/plugin/facturation','sign.png', $path, null);
|
||||
|
||||
$plugin->registerSignal('menu.item', [Facture::class, 'menuItem']);
|
@ -523,4 +523,9 @@ 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/taima/">Facturation</a>', \Garradin\ADMIN_URL);
|
||||
}
|
||||
}
|
||||
|
@ -199,3 +199,9 @@ if (version_compare($infos->version, '0.7.1', '<'))
|
||||
{
|
||||
$plugin->setConfig('ttc', false);
|
||||
}
|
||||
|
||||
// 0.7.4 - Signal menu item
|
||||
if (version_compare($infos->version, '0.7.4', '<'))
|
||||
{
|
||||
$plugin->registerSignal('menu.item', [Facture::class, 'menuItem']);
|
||||
}
|
Loading…
Reference in New Issue
Block a user