You are here

public function Parser::getCsvFieldsById in CSV Importer 8

Get CSV column (first row).

Parameters

int $id: CSV id.

Return value

array|null CSV field names.

Overrides ParserInterface::getCsvFieldsById

File

src/Parser.php, line 51

Class

Parser
Parser manager.

Namespace

Drupal\csv_importer

Code

public function getCsvFieldsById(int $id) {
  $csv = $this
    ->getCsvById($id);
  if ($csv && is_array($csv)) {
    return $csv[0];
  }
  return NULL;
}