. * * ------------------------------------------------------------------------ * * This file is used to manage the printer extended information. * * ------------------------------------------------------------------------ * * @package FusionInventory * @author Vincent Mazzoni * @author David Durieux * @copyright Copyright (c) 2010-2016 FusionInventory team * @license AGPL License 3.0 or (at your option) any later version * http://www.gnu.org/licenses/agpl-3.0-standalone.html * @link http://www.fusioninventory.org/ * @link https://github.com/fusioninventory/fusioninventory-for-glpi * */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /** * Manage the printer extended information. */ class PluginFusioninventoryPrinter extends PluginFusioninventoryItem { /** * The right name for this class * * @var string */ static $rightname = 'plugin_fusioninventory_printer'; public $itemtype = 'Printer'; /** * Get name of this type by language of the user connected * * @param integer $nb number of elements * @return string name of this type */ static function getTypeName($nb = 0) { return ''; } /** * Get the type * * @return string */ static function getType() { return 'Printer'; } /** * Get the tab name used for item * * @param object $item the item object * @param integer $withtemplate 1 if is a template form * @return string name of the tab */ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($this->canView()) { return self::createTabEntry(__('FusionInventory SNMP', 'fusioninventory')); } return ''; } /** * Display the content of the tab * * @param object $item * @param integer $tabnum number of the tab to display * @param integer $withtemplate 1 if is a template form * @return boolean */ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { $fi_path = Plugin::getWebDir('fusioninventory'); if ($item->fields['id'] > 0) { $pfPrinter = new PluginFusioninventoryPrinter(); $pfPrinter->showForm($item, ['target' => $fi_path.'/front/printer_info.form.php']); echo '
'.__('FusionInventory', 'fusioninventory').' | '; echo '|
---|---|
'; echo __('Last inventory', 'fusioninventory'); echo ' | '; echo ''; echo Html::convDateTime($a_printerextend['last_fusioninventory_update']); echo ' | '; echo '
'; echo __('Type'); echo ' | '; echo ''; echo "SNMP"; echo ' | '; echo '