function FilterFormat::prepareRow
Same name in this branch
- 9 core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat::prepareRow()
Same name in other branches
- 8.9.x core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat::prepareRow()
- 8.9.x core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat::prepareRow()
- 10 core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat::prepareRow()
- 10 core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat::prepareRow()
- 11.x core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat::prepareRow()
- 11.x core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat::prepareRow()
Overrides SourcePluginBase::prepareRow
File
-
core/
modules/ filter/ src/ Plugin/ migrate/ source/ d7/ FilterFormat.php, line 47
Class
- FilterFormat
- Drupal 7 filter source from database.
Namespace
Drupal\filter\Plugin\migrate\source\d7Code
public function prepareRow(Row $row) {
// Find filters for this format.
$filters = $this->select('filter', 'f')
->fields('f')
->condition('format', $row->getSourceProperty('format'))
->condition('status', 1)
->execute()
->fetchAllAssoc('name');
foreach ($filters as $id => $filter) {
$filters[$id]['settings'] = unserialize($filter['settings']);
}
$row->setSourceProperty('filters', $filters);
return parent::prepareRow($row);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.