You are here

public function Vote::fields in Voting API 8.3

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/Vote.php, line 35

Class

Vote
Drupal 7 vote source from database.

Namespace

Drupal\votingapi\Plugin\migrate\source\d7

Code

public function fields() {
  $fields = [
    'vote_id' => $this
      ->t('Vote ID'),
    'entity_type' => $this
      ->t('Entity Type'),
    'entity_id' => $this
      ->t('Entity ID'),
    'value' => $this
      ->t('Value'),
    'value_type' => $this
      ->t('Value Type'),
    'tag' => $this
      ->t('Tag'),
    'uid' => $this
      ->t('User ID'),
    'timestamp' => $this
      ->t('Timestamp'),
    'vote_source' => $this
      ->t('Vote Source'),
  ];
  return $fields;
}