public function ImageCachePreset::prepareRow in Drupal 9
Same name and namespace in other branches
- 8 core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php \Drupal\image\Plugin\migrate\source\d6\ImageCachePreset::prepareRow()
Adds additional data to the row.
Parameters
\Drupal\migrate\Row $row: The row object.
Return value
bool FALSE if this row needs to be skipped.
Overrides SourcePluginBase::prepareRow
File
- core/
modules/ image/ src/ Plugin/ migrate/ source/ d6/ ImageCachePreset.php, line 54
Class
- ImageCachePreset
- Drupal 6 imagecache presets source from database.
Namespace
Drupal\image\Plugin\migrate\source\d6Code
public function prepareRow(Row $row) {
$actions = [];
$results = $this
->select('imagecache_action', 'ica')
->fields('ica')
->condition('presetid', $row
->getSourceProperty('presetid'))
->execute();
foreach ($results as $key => $result) {
$actions[$key] = $result;
$actions[$key]['data'] = unserialize($result['data']);
}
$row
->setSourceProperty('actions', $actions);
return parent::prepareRow($row);
}