Skip to content

Commit af8e2a4

Browse files
committed
Allow plugins to register generic assets capacities
1 parent 4f37b86 commit af8e2a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Glpi/Asset/AssetDefinitionManager.php

+8
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,14 @@ public function getAssetTypesClassesNames(bool $with_namespace = true): array
320320
return $classes;
321321
}
322322

323+
/**
324+
* Register a capacity.
325+
*/
326+
public function registerCapacity(CapacityInterface $capacity): array
327+
{
328+
$this->capacities[$capacity::class] = $capacity;
329+
}
330+
323331
/**
324332
* Returns available capacities instances.
325333
*

0 commit comments

Comments
 (0)