You are here

public function Fallback::getDestinationMediaTypeIdBase in Media Migration 8

Same name in this branch
  1. 8 src/Plugin/media_migration/file_entity/Fallback.php \Drupal\media_migration\Plugin\media_migration\file_entity\Fallback::getDestinationMediaTypeIdBase()
  2. 8 src/Plugin/media_migration/file/Fallback.php \Drupal\media_migration\Plugin\media_migration\file\Fallback::getDestinationMediaTypeIdBase()

Overrides MediaDealerBase::getDestinationMediaTypeIdBase

1 call to Fallback::getDestinationMediaTypeIdBase()
Fallback::getDestinationMediaSourceFieldName in src/Plugin/media_migration/file/Fallback.php

File

src/Plugin/media_migration/file/Fallback.php, line 40

Class

Fallback
General plugin for any kind of file.

Namespace

Drupal\media_migration\Plugin\media_migration\file

Code

public function getDestinationMediaTypeIdBase() {
  switch ($this->configuration['mime']) {
    case 'audio':
    case 'image':
    case 'video':
      return $this->configuration['mime'];
    default:
      return 'document';
  }
}