You are here

public function CleanState::__construct in Feeds 8.3

Constructs a new CleanState.

Parameters

int $feed_id: The ID of the feed this state belongs to.

\Drupal\Core\Database\Connection $connection: (optional) The Connection object containing the feeds tables.

File

src/Feeds/State/CleanState.php, line 61

Class

CleanState
State for the clean stage.

Namespace

Drupal\feeds\Feeds\State

Code

public function __construct($feed_id, Connection $connection = NULL) {
  $this->feedId = $feed_id;
  if (empty($connection)) {
    $this->connection = \Drupal::database();
  }
  else {
    $this->connection = $connection;
  }
}