function media_acquiadam_asset_to_uri in Media: Acquia DAM 7
Returns a Drupal URI for the given asset.
Does not necessarily mean the asset is available to Drupal at this URI.
Parameters
AcquiaDAM_Assets_AbstractAsset $asset: The asset to return a URI for.
Return value
string The URI.
1 call to media_acquiadam_asset_to_uri()
- media_acquiadam_create_file_from_asset in includes/
media_acquiadam.helpers.inc - Create a local file entity for an Acquia DAM asset.
File
- includes/
media_acquiadam.helpers.inc, line 167 - Helper functions for working with Acquia DAM within Drupal.
Code
function media_acquiadam_asset_to_uri(AcquiaDAM_Assets_AbstractAsset $asset) {
$uri = sprintf('acquiadam://%d', $asset['id']);
if (!empty($asset['filetype'])) {
$uri = sprintf('%s.%s', $uri, $asset['filetype']);
}
return $uri;
}