You are here

public function FilePlain::fields in Media Migration 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/d7/FilePlain.php, line 152

Class

FilePlain
File Plain source plugin.

Namespace

Drupal\media_migration\Plugin\migrate\source\d7

Code

public function fields() {

  // Fields provided by file_admin module are only included here for developer
  // convenience so that they can be adjusted by altering the generated
  // migration plugins.
  $fields = [
    'fid' => $this
      ->t('The file identifier'),
    'source_field_type' => $this
      ->t('The type of the field where the file is referenced.'),
    'uid' => $this
      ->t('The user identifier'),
    'filename' => $this
      ->t('The file name'),
    'uri' => $this
      ->t('The URI of the file'),
    'filemime' => $this
      ->t('The file mimetype'),
    'filesize' => $this
      ->t('The file size'),
    'status' => $this
      ->t('The file status'),
    'timestamp' => $this
      ->t('The time that the file was added'),
    'created' => $this
      ->t('The created timestamp - (if file_admin module is present in Drupal 7)'),
    'published' => $this
      ->t('The published timestamp - (if file_admin module is present in Drupal 7)'),
    'promote' => $this
      ->t('The promoted flag - (if file_admin module is present in Drupal 7)'),
    'sticky' => $this
      ->t('The sticky flag - (if file_admin module is present in Drupal 7)'),
    'vid' => $this
      ->t('The vid'),
    'alt' => $this
      ->t('The alternate text for the image (if this is a value of an image field)'),
    'title' => $this
      ->t('The title text for the image (if this is a value of an image field)'),
    'mime' => $this
      ->t('The main MIME type of the file'),
    'scheme' => $this
      ->t('The uri scheme of the file (the ID of the stream wrapper)'),
    'description' => $this
      ->t('The file description of the image (if this is a value of a file field)'),
    'display' => $this
      ->t('The display value of the image (if this is a value of a file field)'),
  ];
  return $fields;
}