You are here

public function Parser::getCsvEntity in CSV Importer 8

Load CSV.

Parameters

int $id: CSV id.

Return value

\Drupal\file\Entity\File|null Entity object.

Overrides ParserInterface::getCsvEntity

1 call to Parser::getCsvEntity()
Parser::getCsvById in src/Parser.php
Get CSV by id.

File

src/Parser.php, line 64

Class

Parser
Parser manager.

Namespace

Drupal\csv_importer

Code

public function getCsvEntity(int $id) {
  if ($id) {
    return $this->entityTypeManager
      ->getStorage('file')
      ->load($id);
  }
  return NULL;
}