You are here

public function MediaTypeManager::getBulkMediaTypes in Media Bulk Upload 8

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

Overrides MediaTypeManagerInterface::getBulkMediaTypes

File

src/MediaTypeManager.php, line 151

Class

MediaTypeManager
Class MediaTypeManager

Namespace

Drupal\media_bulk_upload

Code

public function getBulkMediaTypes(MediaBulkConfigInterface $mediaBulkConfig) {
  $mediaTypeIds = $mediaBulkConfig
    ->get('media_types');
  return $this->entityTypeManager
    ->getStorage('media_type')
    ->loadMultiple($mediaTypeIds);
}