public function FileEntitySourceFieldInstance::prepareRow in Media Migration 8
File
- src/
Plugin/ migrate/ source/ d7/ FileEntitySourceFieldInstance.php, line 88
Class
- FileEntitySourceFieldInstance
- Drupal 7 media source field instances source based on source database.
Namespace
Drupal\media_migration\Plugin\migrate\source\d7Code
public function prepareRow(Row $row) {
[
'types' => $types,
'schemes' => $schemes,
] = $row
->getSource();
$type = explode(static::MULTIPLE_SEPARATOR, $types)[0];
$scheme = explode(static::MULTIPLE_SEPARATOR, $schemes)[0];
if (!($dealer_plugin = $this->fileEntityDealerManager
->createInstanceFromTypeAndScheme($type, $scheme))) {
return FALSE;
}
$dealer_plugin
->prepareMediaSourceFieldInstanceRow($row, $this
->getDatabase());
return parent::prepareRow($row);
}