public function ImageStyles::prepareRow in Drupal 8
Same name and namespace in other branches
- 9 core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php \Drupal\image\Plugin\migrate\source\d7\ImageStyles::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/ d7/ ImageStyles.php, line 49
Class
- ImageStyles
- Drupal image styles source from database.
Namespace
Drupal\image\Plugin\migrate\source\d7Code
public function prepareRow(Row $row) {
$effects = [];
$results = $this
->select('image_effects', 'ie')
->fields('ie')
->condition('isid', $row
->getSourceProperty('isid'))
->execute();
foreach ($results as $key => $result) {
$result['data'] = unserialize($result['data']);
$effects[$key] = $result;
}
$row
->setSourceProperty('effects', $effects);
return parent::prepareRow($row);
}