public function BynderService::getBynderMediaTypes in Bynder 8.2
Same name and namespace in other branches
- 8.3 src/BynderService.php \Drupal\bynder\BynderService::getBynderMediaTypes()
- 4.0.x src/BynderService.php \Drupal\bynder\BynderService::getBynderMediaTypes()
Returns the Bynder media types.
Return value
\Drupal\media\MediaTypeInterface[] A list of Bynder media types.
Overrides BynderServiceInterface::getBynderMediaTypes
2 calls to BynderService::getBynderMediaTypes()
- BynderService::getTotalCountOfMediaEntities in src/
BynderService.php - Returns the total number of Bynder media entities.
- BynderService::updateMetadataLastMediaEntities in src/
BynderService.php - Updates metadata of the next N media entities starting at the minimum ID.
File
- src/
BynderService.php, line 113
Class
- BynderService
- Bynder service.
Namespace
Drupal\bynderCode
public function getBynderMediaTypes() {
$bynder_media_types = [];
/** @var \Drupal\media\MediaTypeInterface $media_type */
foreach ($this->entityTypeManager
->getStorage('media_type')
->loadMultiple() as $media_type_id => $media_type) {
if ($media_type
->getSource() instanceof Bynder) {
$bynder_media_types[$media_type_id] = $media_type;
}
}
return $bynder_media_types;
}