interface MediaTypeManagerInterface in Media Bulk Upload 8
Interface MediaTypeManagerInterface
@package Drupal\media_bulk_upload
Hierarchy
- interface \Drupal\media_bulk_upload\MediaTypeManagerInterface
Expanded class hierarchy of MediaTypeManagerInterface
All classes that implement MediaTypeManagerInterface
File
- src/
MediaTypeManagerInterface.php, line 14
Namespace
Drupal\media_bulk_uploadView source
interface MediaTypeManagerInterface {
/**
* Get the Media Type extensions.
*
* @param \Drupal\media\MediaTypeInterface $mediaType
* Media Type.
*
* @return array
* Target Field Settings.
*/
public function getMediaTypeExtensions(MediaTypeInterface $mediaType);
/**
* Return the media type target field.
*
* @param array $targetFieldSettings
* Target field settings.
*
* @return array
* The allowed file extensions.
*/
public function getTargetFieldExtensions(array $targetFieldSettings);
/**
* Get the target field settings for the media type.
*
* @param \Drupal\media\MediaTypeInterface $mediaType
* Media Type.
*
* @return array
* The field settings.
*/
public function getTargetFieldSettings(MediaTypeInterface $mediaType);
/**
* Get the target field name.
*
* @param \Drupal\media\MediaTypeInterface $mediaType
* Media Type.
*
* @return string
* Name of the field.
*/
public function getTargetFieldName(MediaTypeInterface $mediaType);
/**
* Get the media types for a specific file extension.
*
* @param string $extension
* File extension.
*
* @return \Drupal\media\MediaTypeInterface[]
* Media Types
*
* @throws \Exception
*/
public function getMediaTypeIdsByFileExtension($extension);
/**
* Get the target maximum upload size.
*
* Gets the maximum upload size for a file compared to the current
* $maxFileSize, from the media type.
*
* @param \Drupal\media\MediaTypeInterface $mediaType
* Media Type.
*
* @return string
* Returns the max file size as a string.
*/
public function getTargetFieldMaxSize(MediaTypeInterface $mediaType);
/**
* Get Media Types configured for the Media Bulk Upload Form.
*
* @param \Drupal\media_bulk_upload\Entity\MediaBulkConfigInterface $mediaBulkConfig
* Media Bulk Config.
*
* @return \Drupal\media\MediaTypeInterface[]
* Media Types.
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
public function getBulkMediaTypes(MediaBulkConfigInterface $mediaBulkConfig);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaTypeManagerInterface:: |
public | function | Get Media Types configured for the Media Bulk Upload Form. | 1 |
MediaTypeManagerInterface:: |
public | function | Get the Media Type extensions. | 1 |
MediaTypeManagerInterface:: |
public | function | Get the media types for a specific file extension. | 1 |
MediaTypeManagerInterface:: |
public | function | Return the media type target field. | 1 |
MediaTypeManagerInterface:: |
public | function | Get the target maximum upload size. | 1 |
MediaTypeManagerInterface:: |
public | function | Get the target field name. | 1 |
MediaTypeManagerInterface:: |
public | function | Get the target field settings for the media type. | 1 |