public function BynderApi::removeAssetUsage in Bynder 8.3
Same name and namespace in other branches
- 8 src/BynderApi.php \Drupal\bynder\BynderApi::removeAssetUsage()
- 8.2 src/BynderApi.php \Drupal\bynder\BynderApi::removeAssetUsage()
- 4.0.x src/BynderApi.php \Drupal\bynder\BynderApi::removeAssetUsage()
Removes asset usage entry for a specific Bynder asset.
Parameters
$asset_id: Bynder asset ID.
null $usage_url: Url where the asset is being used (node url).
Return value
mixed
Overrides BynderApiInterface::removeAssetUsage
1 method overrides BynderApi::removeAssetUsage()
- BynderApiTest::removeAssetUsage in tests/
modules/ bynder_test_module/ src/ BynderApiTest.php - Sets values in state.
File
- src/
BynderApi.php, line 424
Class
- BynderApi
- Bynder API service.
Namespace
Drupal\bynderCode
public function removeAssetUsage($asset_id, $usage_url = NULL) {
$usageProperties = [
'integration_id' => self::BYNDER_INTEGRATION_ID,
'asset_id' => $asset_id,
'uri' => $usage_url,
];
return $this
->getAssetBankManager()
->deleteUsage($usageProperties)
->wait();
}