diff --git a/hook.php b/hook.php index 66dd3725..54d99277 100644 --- a/hook.php +++ b/hook.php @@ -295,7 +295,13 @@ function plugin_carbon_hook_pre_purge_assettype(CommonDBTM $item) ]); } -function plugin_carbon_MassiveActions($itemtype) +/** + * Massive actions enumeration hook + * + * @param class-string $itemtype + * @return array + */ +function plugin_carbon_MassiveActions($itemtype): array { switch ($itemtype) { case GlpiComputer::class: diff --git a/src/SearchOptions.php b/src/SearchOptions.php index 06df8939..77a66819 100644 --- a/src/SearchOptions.php +++ b/src/SearchOptions.php @@ -130,6 +130,11 @@ public static function getCoreSearchOptions(string $itemtype): array { $sopt = []; + $sopt[] = [ + 'id' => 'carbon', + 'name' => __('Environmental impact', 'carbon'), + ]; + if ($itemtype === GlpiLocation::class) { $sopt[] = [ 'id' => SearchOptions::LOCATION_BOAVIZTA_ZONE,