class FilePlainSourceFieldStorage in Media Migration 8
Drupal 7 media source field instances source based on source database.
Plugin annotation
@MigrateSource(
id = "d7_file_plain_source_field_storage",
source_module = "file"
)
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\FilePlainConfigSourceBase
- class \Drupal\media_migration\Plugin\migrate\source\d7\FilePlainSourceFieldStorage
- class \Drupal\media_migration\Plugin\migrate\source\d7\FilePlainConfigSourceBase
Expanded class hierarchy of FilePlainSourceFieldStorage
File
- src/
Plugin/ migrate/ source/ d7/ FilePlainSourceFieldStorage.php, line 15
Namespace
Drupal\media_migration\Plugin\migrate\source\d7View source
class FilePlainSourceFieldStorage extends FilePlainConfigSourceBase {
/**
* {@inheritdoc}
*/
public function prepareRow(Row $row) {
[
'mimes' => $mimes,
'schemes' => $schemes,
] = $row
->getSource();
$mime = explode(static::MULTIPLE_SEPARATOR, $mimes)[0];
$scheme = explode(static::MULTIPLE_SEPARATOR, $schemes)[0];
if (!($dealer_plugin = $this->fileDealerManager
->createInstanceFromSchemeAndMime($scheme, $mime))) {
return FALSE;
}
$dealer_plugin
->prepareMediaSourceFieldStorageRow($row, $this
->getDatabase());
return parent::prepareRow($row);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigSourceBase:: |
constant | |||
FilePlainConfigSourceBase:: |
protected | property | The file dealer plugin manager. | |
FilePlainConfigSourceBase:: |
protected | property | Whether the source has (fieldable) file entities or not. | |
FilePlainConfigSourceBase:: |
public static | function | ||
FilePlainConfigSourceBase:: |
public | function | 3 | |
FilePlainConfigSourceBase:: |
public | function | 1 | |
FilePlainConfigSourceBase:: |
protected | function | 2 | |
FilePlainConfigSourceBase:: |
protected | function | ||
FilePlainConfigSourceBase:: |
public | function | 1 | |
FilePlainConfigSourceBase:: |
public | function | Constructs a plugin instance. | |
FilePlainSourceFieldStorage:: |
public | function | ||
MediaMigrationDatabaseTrait:: |
protected | function | Returns the file extension expression for the current DB. | |
MediaMigrationDatabaseTrait:: |
protected | function | Returns a base query for file entity types. | |
MediaMigrationDatabaseTrait:: |
protected | function | Returns a base query for plain files. | |
MediaMigrationDatabaseTrait:: |
protected | function | Returns the main MIME type's expression for the current DB. | |
MediaMigrationDatabaseTrait:: |
protected | function | Returns the expression for the DB for getting the URI scheme. | |
MediaMigrationDatabaseTrait:: |
protected | function | Returns the subquery for the user picture-only file IDs. | |
MediaMigrationDatabaseTrait:: |
protected | function | Subquery for FIDs used only in webform submissions and/or by user entities. |