abstract class FeedsBatchBase in Feeds 8.3
Base class for batched feeds tasks.
Hierarchy
- class \Drupal\feeds\FeedsBatchBase implements FeedsBatchInterface
Expanded class hierarchy of FeedsBatchBase
File
- src/
FeedsBatchBase.php, line 8
Namespace
Drupal\feedsView source
abstract class FeedsBatchBase implements FeedsBatchInterface {
/**
* The Feeds executable.
*
* @var \Drupal\feeds\FeedsExecutableInterface
*/
protected $executable;
/**
* The feed to run a batch for.
*
* @var \Drupal\feeds\FeedInterface
*/
protected $feed;
/**
* The stage of the batch to run.
*
* @var string
*/
protected $stage;
/**
* A list of operations to run.
*
* @var array
*/
protected $operations = [];
/**
* Constructs a new FeedsBatchBase object.
*
* @param \Drupal\feeds\FeedsExecutableInterface $executable
* The Feeds executable.
* @param \Drupal\feeds\FeedInterface $feed
* The feed to run a batch for.
* @param string $stage
* The stage of the batch to run.
*/
public function __construct(FeedsExecutableInterface $executable, FeedInterface $feed, $stage) {
$this->executable = $executable;
$this->feed = $feed;
$this->stage = $stage;
}
/**
* {@inheritdoc}
*/
public function addOperation($stage, array $params = []) {
$this->operations[] = [
'stage' => $stage,
'params' => $params,
];
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsBatchBase:: |
protected | property | The Feeds executable. | |
FeedsBatchBase:: |
protected | property | The feed to run a batch for. | |
FeedsBatchBase:: |
protected | property | A list of operations to run. | |
FeedsBatchBase:: |
protected | property | The stage of the batch to run. | |
FeedsBatchBase:: |
public | function |
Adds an operation. Overrides FeedsBatchInterface:: |
|
FeedsBatchBase:: |
public | function | Constructs a new FeedsBatchBase object. | 1 |
FeedsBatchInterface:: |
public | function | Runs the batch. | 3 |