You are here

public function AcquiaDAM_Assets_AbstractAsset::getMultiple in Media: Acquia DAM 7

Get multiple assets at once.

Parameters

array $assetIds: An array of assets ID to fetch.

Return value

array|false The request response or FALSE on failure.

File

src/AcquiaDAM/AcquiaDAM_Assets_AbstractAsset.inc, line 203

Class

AcquiaDAM_Assets_AbstractAsset
Abstract class base for Acquia DAM assets.

Code

public function getMultiple(array $assetIds) {
  $assetIds = array_filter($assetIds, function ($assetId) {
    return $this
      ->ensureIsValidAssetId($assetId) !== FALSE;
  });
  $assetIds = array_filter($assetIds);
  $data = [
    'ids' => implode(',', $assetIds),
  ];
  return $this
    ->request(sprintf('%s/list', $this
    ->getEndpointBase()), $data);
}