You are here

public function AssetInventoryInterface::getInventory in farmOS 2.x

Get inventory summaries for an asset.

Parameters

\Drupal\asset\Entity\AssetInterface $asset: The Asset entity.

string $measure: The quantity measure of the inventory. See quantity_measures().

int $units: The quantity units of the inventory (term ID).

Return value

array Returns an array of asset inventory information.

File

modules/core/inventory/src/AssetInventoryInterface.php, line 25

Class

AssetInventoryInterface
Asset inventory logic.

Namespace

Drupal\farm_inventory

Code

public function getInventory(AssetInterface $asset, string $measure = '', int $units = 0) : array;