public function Image::prepareMediaEntityRow in Media Migration 8
Same name in this branch
- 8 src/Plugin/media_migration/file_entity/Image.php \Drupal\media_migration\Plugin\media_migration\file_entity\Image::prepareMediaEntityRow()
- 8 src/Plugin/media_migration/file/Image.php \Drupal\media_migration\Plugin\media_migration\file\Image::prepareMediaEntityRow()
Overrides MediaDealerBase::prepareMediaEntityRow
File
- src/
Plugin/ media_migration/ file/ Image.php, line 60
Class
- Image
- Plugin for images.
Namespace
Drupal\media_migration\Plugin\media_migration\fileCode
public function prepareMediaEntityRow(Row $row, Connection $connection) : void {
parent::prepareMediaEntityRow($row, $connection);
$file_id = $row
->getSourceProperty('fid');
foreach ($this
->getImageData($connection, $file_id) as $data_key => $data_value) {
$row
->setSourceProperty($data_key, $data_value);
}
foreach ($this
->getFileData($connection, $file_id) as $data_key => $data_value) {
$row
->setSourceProperty($data_key, $data_value);
}
}