diff --git a/inc/targetbase.class.php b/inc/targetbase.class.php index 6faeeb5b6..a73e0cceb 100644 --- a/inc/targetbase.class.php +++ b/inc/targetbase.class.php @@ -1817,4 +1817,15 @@ protected function showActorSettingsForType($actorType, array $actors) { echo ''; } + + 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); + } }