function ImageStyles::prepareRow
Same name in other branches
- 9 core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php \Drupal\image\Plugin\migrate\source\d7\ImageStyles::prepareRow()
- 10 core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php \Drupal\image\Plugin\migrate\source\d7\ImageStyles::prepareRow()
- 11.x core/modules/image/src/Plugin/migrate/source/d7/ImageStyles.php \Drupal\image\Plugin\migrate\source\d7\ImageStyles::prepareRow()
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.