public static function checkNecessaryFieldsDelete($itemtype, $field) { $type = new PluginGenericobjectType(); $type->getFromDBByType($itemtype); if ($type->canUseNetworkPorts() && 'locations_id' == $field) { return false; } /* if ($type->fields['use_direct_connections']) { foreach(array('users_id','groups_id',' states_id','locations_id') as $tmp_field) { if ($tmp_field == $field) { return false; } } }*/ return true; }