diff --git a/inc/questionparameter.class.php b/inc/questionparameter.class.php index d25806cc3..8b9497ca0 100644 --- a/inc/questionparameter.class.php +++ b/inc/questionparameter.class.php @@ -80,4 +80,15 @@ public function prepareInputforAdd($input) { return $input; } + + public function deleteObsoleteItems(CommonDBTM $container, array $exclude) + { + $keepCriteria = [ + self::$items_id => $container->getID(), + ]; + if (count($exclude) > 0) { + $keepCriteria[] = ['NOT' => ['id' => $exclude]]; + } + return $this->deleteByCriteria($keepCriteria); + } }