public function MediaTypePersistenceManagerInterface::save in Gutenberg 8.2
Same name and namespace in other branches
- 8 src/Persistence/MediaTypePersistenceManagerInterface.php \Drupal\gutenberg\Persistence\MediaTypePersistenceManagerInterface::save()
Perform saving process of an uploaded file as media entity.
Parameters
string $media_type: Media type machine name.
\Drupal\file\Entity\File $file_entity: File entity instance.
Return value
\Drupal\media\Entity\Media|null Created media type or null if failed.
Throws
\Exception
1 method overrides MediaTypePersistenceManagerInterface::save()
- MediaTypePersistenceManager::save in src/
Persistence/ MediaTypePersistenceManager.php - Perform saving process of an uploaded file as media entity.
File
- src/
Persistence/ MediaTypePersistenceManagerInterface.php, line 27
Class
- MediaTypePersistenceManagerInterface
- Handles media type persistence process.
Namespace
Drupal\gutenberg\PersistenceCode
public function save(string $media_type, File $file_entity);