Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions src/SearchOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down