protected function AssetMediaFactory::getMediaBundleFields in Media: Acquia DAM 8
Gets a list of media IDs by bundle.
Primarily broken out to make test mocking easier.
Parameters
string $bundle: The media bundle to filter by.
string $field: The asset ID field.
int $assetId: The asset ID to get media entity IDs for.
Return value
array|int A list of media entity IDs.
1 call to AssetMediaFactory::getMediaBundleFields()
- AssetMediaFactory::getAssetUsage in src/
Service/ AssetMediaFactory.php - Get a collection of media entities using the given asset ID.
File
- src/
Service/ AssetMediaFactory.php, line 183
Class
- AssetMediaFactory
- Class AssetMediaFactory.
Namespace
Drupal\media_acquiadam\ServiceCode
protected function getMediaBundleFields($bundle, $field, $assetId) {
return $this->mediaStorage
->getQuery()
->condition('bundle', $bundle)
->condition($field, $assetId)
->execute();
}