class FilePlainType in Media Migration 8
File Plain Type source plugin.
Plugin annotation
@MigrateSource(
id = "d7_file_plain_type",
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\FilePlainType
- class \Drupal\media_migration\Plugin\migrate\source\d7\FilePlainConfigSourceBase
Expanded class hierarchy of FilePlainType
File
- src/
Plugin/ migrate/ source/ d7/ FilePlainType.php, line 15
Namespace
Drupal\media_migration\Plugin\migrate\source\d7View source
class FilePlainType 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
->prepareMediaTypeRow($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. | |
FilePlainType:: |
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. |