You are here

public function SpreadsheetIteratorInterface::setConfiguration in Migrate Spreadsheet 8

Same name and namespace in other branches
  1. 2.0.x src/SpreadsheetIteratorInterface.php \Drupal\migrate_spreadsheet\SpreadsheetIteratorInterface::setConfiguration()

Sets the iterator configuration.

The caller should assure sane values.

Parameters

array $configuration: An associative array with the next keys:

  • worksheet (\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet): The worksheet object.
  • columns (string[]): An indexed array of columns.
  • keys (string[]): A list of columns that are giving the primary key.
  • header_row (int): The index of the first row from where the table starts. It's the value of the spreadsheet row that contains the table header. If the table row is the first this should be 1. A value of 3 would mean that the table header is on the third row.
  • row_index_column (string): The row index column name. The 'row index column' is a pseudo-column, that not exist on the worksheet, containing the current index/position/delta of each row. The caller can pass a name to be used for that column. If a name was passed, that column will be also outputted along with the row, in ::current(). The same name can be passed also in 'keys' list. In that case the row index will be or will be part of the primary key.

Return value

$this

1 method overrides SpreadsheetIteratorInterface::setConfiguration()
SpreadsheetIterator::setConfiguration in src/SpreadsheetIterator.php
Sets the iterator configuration.

File

src/SpreadsheetIteratorInterface.php, line 35

Class

SpreadsheetIteratorInterface
Provides an interface for spreadsheet iterators.

Namespace

Drupal\migrate_spreadsheet

Code

public function setConfiguration(array $configuration);