You are here

public function MigrateDestinationParagraphsItem::fields in Paragraphs 7

Returns a list of fields available to be mapped for the node type (bundle)

Parameters

Migration $migration: Optionally, the migration containing this destination.

Return value

array Keys: machine names of the fields (to be passed to addFieldMapping) Values: Human-friendly descriptions of the fields.

Overrides MigrateDestination::fields

File

migrate/destinations/MigrateDestinationParagraphsItem.inc, line 75

Class

MigrateDestinationParagraphsItem
Provides basic class for importing Paragraphs via Migrate API.

Code

public function fields(Migration $migration = NULL) {
  $fields = array();
  $fields['field_name'] = t('Field name');
  $fields['archived'] = t('Archived status of the paragraph item');
  $fields += migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle, $migration);
  $fields += migrate_handler_invoke_all('ParagraphsItem', 'fields', $this->entityType, $this->bundle, $migration);
  return $fields;
}