protected function ContentEntity::buildRow in Workbench Moderation to Content Moderation 8.2
1 call to ContentEntity::buildRow()
- ContentEntity::initializeIterator in src/
Plugin/ migrate/ source/ ContentEntity.php - Initializes the iterator with the source data.
File
- src/
Plugin/ migrate/ source/ ContentEntity.php, line 82
Class
- ContentEntity
- Loads certain fields from all content entities of a specific type.
Namespace
Drupal\wbm2cm\Plugin\migrate\sourceCode
protected function buildRow(ContentEntityInterface $entity) {
$row = [];
foreach ($this
->fields() as $field) {
$items = $entity
->get($field);
$property = $items
->getFieldDefinition()
->getFieldStorageDefinition()
->getMainPropertyName();
$row[$field] = $items->{$property};
}
return $row;
}