diff --git a/library/ZendAfi/View/Helper/TagListeCoches.php b/library/ZendAfi/View/Helper/TagListeCoches.php index 83760f3d6dcf1ab711cb6754045885545782246e..1a6eb00e960b18f8f33725d871e384b1c1e26c79 100644 --- a/library/ZendAfi/View/Helper/TagListeCoches.php +++ b/library/ZendAfi/View/Helper/TagListeCoches.php @@ -225,7 +225,12 @@ class ZendAfi_View_Helper_TagListeCochesSourceDocType extends ZendAfi_View_Helpe protected function getInstances() { - $instances = parent::getInstances(); + $instances = array_filter( + parent::getInstances(), + function($instance) { + return 0 < Class_Notice::countBy(['type_doc' => $instance->getId()]); + }); + usort($instances, function($a, $b) { @@ -234,7 +239,6 @@ class ZendAfi_View_Helper_TagListeCochesSourceDocType extends ZendAfi_View_Helpe return $instances; } - }