. * ------------------------------------------------------------------------- * @copyright Copyright (C) 2006-2022 by Example plugin team. * @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html * @link https://github.com/pluginsGLPI/example * ------------------------------------------------------------------------- */ class PluginExampleConfig extends CommonDBTM { static protected $notable = true; function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (!$withtemplate) { if ($item->getType() == 'Config') { return __('Example plugin'); } } return ''; } static function configUpdate($input) { $input['configuration'] = 1 - $input['configuration']; return $input; } function showFormExample() { global $CFG_GLPI; if (!Session::haveRight("config", UPDATE)) { return false; } $my_config = Config::getConfigurationValues('plugin:Example'); echo "