class FileEntitySourceFieldStorage in Media Migration 8
Drupal 7 media source field storage source based on source database.
Plugin annotation
@MigrateSource(
id = "d7_file_entity_source_field_storage",
source_module = "file_entity"
)
Hierarchy
- class \Drupal\media_migration\Plugin\migrate\source\d7\ConfigSourceBase extends \Drupal\media_migration\Plugin\migrate\source\d7\DrupalSqlBaseWithCountCompatibility uses MediaMigrationDatabaseTrait
- class \Drupal\media_migration\Plugin\migrate\source\d7\FileEntityConfigSourceBase
- class \Drupal\media_migration\Plugin\migrate\source\d7\FileEntitySourceFieldStorage
- class \Drupal\media_migration\Plugin\migrate\source\d7\FileEntityConfigSourceBase
Expanded class hierarchy of FileEntitySourceFieldStorage
File
- src/
Plugin/ migrate/ source/ d7/ FileEntitySourceFieldStorage.php, line 15
Namespace
Drupal\media_migration\Plugin\migrate\source\d7View source
class FileEntitySourceFieldStorage extends FileEntityConfigSourceBase {
/**
* {@inheritdoc}
*/
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
->prepareMediaSourceFieldStorageRow($row, $this
->getDatabase());
return parent::prepareRow($row);
}
}