function CommentType::prepareRow
Same name in other branches
- 9 core/modules/comment/src/Plugin/migrate/source/CommentType.php \Drupal\comment\Plugin\migrate\source\CommentType::prepareRow()
- 8.9.x core/modules/comment/src/Plugin/migrate/source/d7/CommentType.php \Drupal\comment\Plugin\migrate\source\d7\CommentType::prepareRow()
- 10 core/modules/comment/src/Plugin/migrate/source/CommentType.php \Drupal\comment\Plugin\migrate\source\CommentType::prepareRow()
Overrides SourcePluginBase::prepareRow
File
-
core/
modules/ comment/ src/ Plugin/ migrate/ source/ CommentType.php, line 35
Class
- CommentType
- Drupal 6/7 comment types source from database.
Namespace
Drupal\comment\Plugin\migrate\sourceCode
public function prepareRow(Row $row) {
$node_type = $row->getSourceProperty('type');
foreach (array_keys($this->getCommentFields()) as $field) {
$row->setSourceProperty($field, $this->variableGet($field . '_' . $node_type, NULL));
}
return parent::prepareRow($row);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.