You are here

public function FeedsBatchBase::addOperation in Feeds 8.3

Adds an operation.

Parameters

string $stage: The stage of the operation to add.

array $params: (optional) A list of parameters for the operation.

Return value

$this An instance of this class.

Overrides FeedsBatchInterface::addOperation

File

src/FeedsBatchBase.php, line 57

Class

FeedsBatchBase
Base class for batched feeds tasks.

Namespace

Drupal\feeds

Code

public function addOperation($stage, array $params = []) {
  $this->operations[] = [
    'stage' => $stage,
    'params' => $params,
  ];
  return $this;
}