. * --------------------------------------------------------------------- */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /// Class DeviceSimcard class DeviceSimcard extends CommonDevice { static protected $forward_entity_to = ['Item_DeviceSimcard', 'Infocom']; static function getTypeName($nb = 0) { return _n('Simcard', 'Simcards', $nb); } function getAdditionalFields() { return array_merge( parent::getAdditionalFields(), [ [ 'name' => 'devicesimcardtypes_id', 'label' => _n('Type', 'Types', 1), 'type' => 'dropdownValue' ], [ 'name' => 'voltage', 'label' => __('Voltage'), 'type' => 'text', 'unit' => 'mV' ], [ 'name' => 'allow_voip', 'label' => __('Allow VOIP'), 'type' => 'bool' ], ] ); } function rawSearchOptions() { $tab = parent::rawSearchOptions(); $tab[] = [ 'id' => '12', 'table' => $this->getTable(), 'field' => 'voltage', 'name' => __('Voltage'), 'datatype' => 'string', 'autocomplete' => true, ]; $tab[] = [ 'id' => '13', 'table' => 'glpi_devicesimcardtypes', 'field' => 'name', 'name' => _n('Type', 'Types', 1), 'datatype' => 'dropdown' ]; $tab[] = [ 'id' => '14', 'table' => $this->getTable(), 'field' => 'allow_voip', 'name' => __('Allow VOIP'), 'datatype' => 'bool' ]; return $tab; } /** * Criteria used for import function * * @see CommonDevice::getImportCriteria() * * @since 9.2 **/ function getImportCriteria() { return [ 'designation' => 'equal', 'manufacturers_id' => 'equal', 'devicesensortypes_id' => 'equal', ]; } static function getIcon() { return "fas fa-sim-card"; } }