public function Vocabulary::prepareRow in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary::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/ taxonomy/ src/ Plugin/ migrate/ source/ d6/ Vocabulary.php, line 67 - Contains \Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary.
Class
- Vocabulary
- Drupal 6 vocabularies source from database.
Namespace
Drupal\taxonomy\Plugin\migrate\source\d6Code
public function prepareRow(Row $row) {
// Find node types for this row.
$node_types = $this
->select('vocabulary_node_types', 'nt')
->fields('nt', array(
'type',
'vid',
))
->condition('vid', $row
->getSourceProperty('vid'))
->execute()
->fetchCol();
$row
->setSourceProperty('node_types', $node_types);
return parent::prepareRow($row);
}