You are here

public function MigrateDestinationAsset::fields in Asset 7

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

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

includes/asset.migrate.inc, line 55
Asset Migrate integration.

Class

MigrateDestinationAsset
Destination class implementing migration into assets.

Code

public function fields() {
  $fields = array();

  // First the core (asset table) properties.
  $fields['aid'] = t('Asset: Existing asset ID');
  $fields['uid'] = t('Asset: Authored by (uid)');
  $fields['title'] = t('Asset: Title');
  $fields['created'] = t('Asset: Created timestamp');
  $fields['changed'] = t('Asset: Modified timestamp');

  // Then add in anything provided by handlers.
  $fields += migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle);
  $fields += migrate_handler_invoke_all('Asset', 'fields', $this->entityType, $this->bundle);
  return $fields;
}