public function FilterFormat::prepareRow in Zircon Profile 8
Same name in this branch
- 8 core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat::prepareRow()
- 8 core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat::prepareRow()
Same name and namespace in other branches
- 8.0 core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat::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/ filter/ src/ Plugin/ migrate/ source/ d7/ FilterFormat.php, line 46 - Contains \Drupal\filter\Plugin\migrate\source\d7\FilterFormat.
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);
}