public function MediaDealerBase::prepareMediaSourceFieldWidgetRow in Media Migration 8
File
- src/
MediaDealerBase.php, line 199
Class
- MediaDealerBase
- Base implementation of media dealer plugins.
Namespace
Drupal\media_migrationCode
public function prepareMediaSourceFieldWidgetRow(Row $row, Connection $connection) : void {
$source_field_definition = $this->fieldTypeManager
->getDefinition($this
->getMediaSourceFieldStorage()
->getType(), FALSE) ?? [];
$default_widget = $source_field_definition['default_widget'] ?? NULL;
if ($default_widget) {
$row
->setSourceProperty('options', [
'type' => $default_widget,
'weight' => 0,
]);
}
}