protected function AcquiaDAM_Assets_AbstractAsset::requireId in Media: Acquia DAM 7
Ensure we have an asset ID set.
Used when we want to ensure we're working with an ID and were not given an array of data instead.
Throws
BadMethodCallException
4 calls to AcquiaDAM_Assets_AbstractAsset::requireId()
- AcquiaDAM_Assets_AbstractAsset::get in src/
AcquiaDAM/ AcquiaDAM_Assets_AbstractAsset.inc - Fetch the asset from the API.
- AcquiaDAM_Assets_Asset::getDownload in src/
AcquiaDAM/ AcquiaDAM_Assets_Asset.inc - Get the asset download URL.
- AcquiaDAM_Assets_Asset::getMetadata in src/
AcquiaDAM/ AcquiaDAM_Assets_Asset.inc - Get metadata for the asset.
- AcquiaDAM_Assets_Folder::getAssets in src/
AcquiaDAM/ AcquiaDAM_Assets_Folder.inc - Get assets located in the folder.
File
- src/
AcquiaDAM/ AcquiaDAM_Assets_AbstractAsset.inc, line 139
Class
- AcquiaDAM_Assets_AbstractAsset
- Abstract class base for Acquia DAM assets.
Code
protected function requireId() {
if (is_null($this->assetId)) {
throw new BadMethodCallException('No asset ID has been set.');
}
}