NodeComment.php in Import 8
Same filename and directory in other branches
Namespace
Drupal\import\Plugin\migrate\sourceFile
src/Plugin/migrate/source/NodeComment.phpView source
<?php
/**
* @file
* Contains \Drupal\import\Plugin\migrate\source\NodeComment.
*/
namespace Drupal\import\Plugin\migrate\source;
use Drupal\migrate\Row;
use Drupal\migrate_source_csv\Plugin\migrate\source\CSV;
/**
* Source for node Comment CSV.
*
* @MigrateSource(
* id = "node_comment"
* )
*/
class NodeComment extends CSV {
public function prepareRow(Row $row) {
// Provide the Default comment settings.
$row
->setDestinationProperty('entity_type', 'node');
$row
->setDestinationProperty('field_name', 'comment');
}
}
Classes
Name | Description |
---|---|
NodeComment | Source for node Comment CSV. |