You are here

public function MediaTypeManager::getTargetFieldExtensions in Media Bulk Upload 8

Return the media type target field.

Parameters

array $targetFieldSettings: Target field settings.

Return value

array The allowed file extensions.

Overrides MediaTypeManagerInterface::getTargetFieldExtensions

1 call to MediaTypeManager::getTargetFieldExtensions()
MediaTypeManager::getMediaTypeExtensions in src/MediaTypeManager.php
Get the Media Type extensions.

File

src/MediaTypeManager.php, line 100

Class

MediaTypeManager
Class MediaTypeManager

Namespace

Drupal\media_bulk_upload

Code

public function getTargetFieldExtensions(array $targetFieldSettings) {
  $extensions = isset($targetFieldSettings['file_extensions']) ? $targetFieldSettings['file_extensions'] : '';
  return array_map('trim', explode(' ', $extensions));
}