You are here

public function MediaEntityGenerator::fields in Migrate File Entities to Media Entities 8

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

File

src/Plugin/migrate/source/MediaEntityGenerator.php, line 123

Class

MediaEntityGenerator
Returns bare-bones information about every available file entity.

Namespace

Drupal\migrate_file_to_media\Plugin\migrate\source

Code

public function fields() {
  return [
    'target_id' => $this
      ->t('The file entity ID.'),
    'file_id' => $this
      ->t('The file entity ID.'),
    'file_path' => $this
      ->t('The file path.'),
    'file_name' => $this
      ->t('The file name.'),
    'file_alt' => $this
      ->t('The file arl.'),
    'file_title' => $this
      ->t('The file title.'),
  ];
}