You are here

public function Fallback::getDestinationMediaSourcePluginId 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::getDestinationMediaSourcePluginId()
  2. 8 src/Plugin/media_migration/file/Fallback.php \Drupal\media_migration\Plugin\media_migration\file\Fallback::getDestinationMediaSourcePluginId()

Overrides MediaDealerBase::getDestinationMediaSourcePluginId

2 calls to Fallback::getDestinationMediaSourcePluginId()
Fallback::getDestinationMediaTypeSourceFieldLabel in src/Plugin/media_migration/file/Fallback.php
Fallback::prepareMediaSourceFieldFormatterRow in src/Plugin/media_migration/file/Fallback.php

File

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

Class

Fallback
General plugin for any kind of file.

Namespace

Drupal\media_migration\Plugin\media_migration\file

Code

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