public function ImageCachePreset::prepareRow in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php \Drupal\image\Plugin\migrate\source\d6\ImageCachePreset::prepareRow()
Add 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 - Contains \Drupal\image\Plugin\migrate\source\d6\ImageCachePreset.
Class
- ImageCachePreset
- Drupal 6 imagecache presets source from database.
Namespace
Drupal\image\Plugin\migrate\source\d6Code
public function prepareRow(Row $row) {
$actions = array();
$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);
}