You are here

public function MediaTypePersistenceManagerInterface::save in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 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\Persistence

Code

public function save(string $media_type, File $file_entity);