You are here

public function Book::fields in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/book/src/Plugin/migrate/source/Book.php \Drupal\book\Plugin\migrate\source\Book::fields()

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

core/modules/book/src/Plugin/migrate/source/Book.php, line 44

Class

Book
Drupal 6 and 7 book source.

Namespace

Drupal\book\Plugin\migrate\source

Code

public function fields() {
  return [
    'nid' => $this
      ->t('Node ID'),
    'bid' => $this
      ->t('Book ID'),
    'mlid' => $this
      ->t('Menu link ID'),
    'plid' => $this
      ->t('Parent link ID'),
    'weight' => $this
      ->t('Weight'),
    'p1' => $this
      ->t('The first mlid in the materialized path. If N = depth, then pN must equal the mlid. If depth > 1 then p(N-1) must equal the parent link mlid. All pX where X > depth must equal zero. The columns p1 .. p9 are also called the parents.'),
    'p2' => $this
      ->t('The second mlid in the materialized path. See p1.'),
    'p3' => $this
      ->t('The third mlid in the materialized path. See p1.'),
    'p4' => $this
      ->t('The fourth mlid in the materialized path. See p1.'),
    'p5' => $this
      ->t('The fifth mlid in the materialized path. See p1.'),
    'p6' => $this
      ->t('The sixth mlid in the materialized path. See p1.'),
    'p7' => $this
      ->t('The seventh mlid in the materialized path. See p1.'),
    'p8' => $this
      ->t('The eighth mlid in the materialized path. See p1.'),
    'p9' => $this
      ->t('The ninth mlid in the materialized path. See p1.'),
  ];
}