public function MediaDealerBase::prepareMediaSourceFieldFormatterRow in Media Migration 8
6 calls to MediaDealerBase::prepareMediaSourceFieldFormatterRow()
- Audio::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file_entity/ Audio.php - Fallback::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file/ Fallback.php - Image::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file/ Image.php - Image::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file_entity/ Image.php - RemoteVideoBase::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file_entity/ RemoteVideoBase.php
6 methods override MediaDealerBase::prepareMediaSourceFieldFormatterRow()
- Audio::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file_entity/ Audio.php - Fallback::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file/ Fallback.php - Image::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file/ Image.php - Image::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file_entity/ Image.php - RemoteVideoBase::prepareMediaSourceFieldFormatterRow in src/
Plugin/ media_migration/ file_entity/ RemoteVideoBase.php
File
- src/
MediaDealerBase.php, line 214
Class
- MediaDealerBase
- Base implementation of media dealer plugins.
Namespace
Drupal\media_migrationCode
public function prepareMediaSourceFieldFormatterRow(Row $row, Connection $connection) : void {
$source_field_definition = $this->fieldTypeManager
->getDefinition($this
->getMediaSourceFieldStorage()
->getType(), FALSE) ?? [];
$default_formatter = $source_field_definition['default_formatter'] ?? NULL;
if ($default_formatter) {
$row
->setSourceProperty('options', [
'type' => $default_formatter,
'weight' => 0,
'label' => 'visually_hidden',
]);
}
}