. -------------------------------------------------------------------------- */ // ---------------------------------------------------------------------- // Original Author of file: // Purpose of file: // ---------------------------------------------------------------------- // Class of the defined type if (!defined('GLPI_ROOT')) { die("Sorry. You can't access directly to this file"); } class PluginExampleComputer extends CommonDBTM { static function showInfo() { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'.__('More information').'
'; echo __('Test successful'); echo '
'; } // implement "item_can" hook (9.2) for Computer static function restrict(Computer $comp) { // no right to see computer from group 1 if (isset($comp->right)) { // call from ConnDBTM::can method, filter for current item if ($comp->getField('groups_id') == 1) { $comp->right = false; } } else { // called from Search::addDefaultWhere method, return additional condition $comp->add_where = "glpi_computers.groups_id != 1"; } } }