public function ContentEntity::fields in Workbench Moderation to Content Moderation 8.2
Returns available fields on the source.
Return value
array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.
Overrides MigrateSourceInterface::fields
1 call to ContentEntity::fields()
- ContentEntity::buildRow in src/
Plugin/ migrate/ source/ ContentEntity.php
File
- src/
Plugin/ migrate/ source/ ContentEntity.php, line 125
Class
- ContentEntity
- Loads certain fields from all content entities of a specific type.
Namespace
Drupal\wbm2cm\Plugin\migrate\sourceCode
public function fields() {
$fields = [];
$entity_type = $this->storage
->getEntityType();
foreach ($this->configuration['keys'] as $key) {
$key = $entity_type
->getKey($key);
$fields[$key] = $key;
}
return $fields + array_combine($this->configuration['fields'], $this->configuration['fields']);
}