public function getUsageCount(AssetInterface $asset) { $usageCount = 0; /** @var AssetUsageStrategyInterface $strategy */ foreach ($this->getUsageStrategies() as $strategy) { $usageCount += $strategy->getUsageCount($asset); } return $usageCount; }
/** * Returns the number of times the asset is in use. * * @return integer * @api */ public function getUsageCount() { return $this->assetService->getUsageCount($this); }