mirror of
https://github.com/pluginsGLPI/example.git
synced 2026-01-12 10:55:06 +01:00
Feature GLP11 (#88)
* Feature GLP11 * phpstan * enable CI and fix phstanneon * Update .github/workflows/continuous-integration.yml Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * Update phpstan.neon Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> * Pass all paramters to parent call * move query -> doQuery * fix direct query * release GLPI 11.0 * Clean composer.json * psalm + rector * fix --------- Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> Co-authored-by: Johan Cwiklinski <johan@x-tnd.be> Co-authored-by: Rom1-B <rom1.biot@gmail.com>
This commit is contained in:
@@ -34,17 +34,27 @@ use CommonGLPI;
|
||||
use Html;
|
||||
use Session;
|
||||
|
||||
final class Profile extends \Profile
|
||||
class Profile extends \Profile
|
||||
{
|
||||
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
|
||||
{
|
||||
return __('Example plugin');
|
||||
if (
|
||||
$item instanceof \Profile
|
||||
&& $item->getField('id')
|
||||
) {
|
||||
return self::createTabEntry(__s('Example plugin'));
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
|
||||
{
|
||||
$profile = new self();
|
||||
$profile->showFormExample($item->getID());
|
||||
if ($item instanceof self) {
|
||||
$profile = new self();
|
||||
$profile->showFormExample($item->getID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function showFormExample(int $profiles_id): void
|
||||
|
||||
Reference in New Issue
Block a user