static function countForItem(CommonDBTM $item) { return countElementsInTable('glpi_networkports', ['itemtype' => $item->getType(), 'items_id' => $item->getField('id'), 'is_deleted' => 0]); }