public function Fallback::getDestinationMediaSourceFieldName in Media Migration 8
Same name in this branch
- 8 src/Plugin/media_migration/file_entity/Fallback.php \Drupal\media_migration\Plugin\media_migration\file_entity\Fallback::getDestinationMediaSourceFieldName()
- 8 src/Plugin/media_migration/file/Fallback.php \Drupal\media_migration\Plugin\media_migration\file\Fallback::getDestinationMediaSourceFieldName()
Overrides MediaDealerBase::getDestinationMediaSourceFieldName
1 call to Fallback::getDestinationMediaSourceFieldName()
- Fallback::alterMediaEntityMigrationDefinition in src/
Plugin/ media_migration/ file/ Fallback.php - Alters the definition of the media entity migration.
File
- src/
Plugin/ media_migration/ file/ Fallback.php, line 55
Class
- Fallback
- General plugin for any kind of file.
Namespace
Drupal\media_migration\Plugin\media_migration\fileCode
public function getDestinationMediaSourceFieldName() {
// Document's field name should be field_media_document[_private].
if ($this
->getDestinationMediaTypeIdBase() === 'document') {
return implode('_', array_filter([
'field',
'media',
'document',
$this->configuration['scheme'] === 'public' ? NULL : $this->configuration['scheme'],
]));
}
return parent::getDestinationMediaSourceFieldName();
}