class FeedsBatchExecutable in Feeds 8.3
Import feeds using the batch API.
Hierarchy
- class \Drupal\feeds\FeedsExecutable implements ContainerInjectionInterface, FeedsExecutableInterface uses DependencySerializationTrait, StringTranslationTrait, EventDispatcherTrait
- class \Drupal\feeds\FeedsBatchExecutable
Expanded class hierarchy of FeedsBatchExecutable
File
- src/
FeedsBatchExecutable.php, line 10
Namespace
Drupal\feedsView source
class FeedsBatchExecutable extends FeedsExecutable {
/**
* {@inheritdoc}
*/
protected function createBatch(FeedInterface $feed, $stage) {
return new FeedsBatchBatch($this, $feed, $stage);
}
/**
* {@inheritdoc}
*/
protected function finish(FeedInterface $feed, FetcherResultInterface $fetcher_result) {
$result = parent::finish($feed, $fetcher_result);
if ($result) {
// Start a batch for expiring items.
$feed
->startBatchExpire();
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
EventDispatcherTrait:: |
private | property | The event dispatcher service. | |
EventDispatcherTrait:: |
protected | function | Dispatches an event. | |
EventDispatcherTrait:: |
protected | function | Returns the event dispatcher service. | |
EventDispatcherTrait:: |
public | function | Sets the event dispatcher service to use. | |
FeedsBatchExecutable:: |
protected | function |
Creates a new batch object. Overrides FeedsExecutable:: |
|
FeedsBatchExecutable:: |
protected | function |
Finalizes the import. Overrides FeedsExecutable:: |
|
FeedsExecutable:: |
protected | property | The account switcher. | |
FeedsExecutable:: |
protected | property | The entity type manager. | |
FeedsExecutable:: |
protected | property | The messenger service. | |
FeedsExecutable:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
1 |
FeedsExecutable:: |
protected | function | Cleans an entity. | |
FeedsExecutable:: |
protected | function | Invokes the fetch stage. | |
FeedsExecutable:: |
protected | function | Parses. | |
FeedsExecutable:: |
protected | function | Processes an item. | |
FeedsExecutable:: |
protected | function | Handles an exception during importing. | 1 |
FeedsExecutable:: |
protected | function | Begin an import. | |
FeedsExecutable:: |
public | function |
Processes a stage of an import. Overrides FeedsExecutableInterface:: |
|
FeedsExecutable:: |
protected | function | Safely switches to another account. | |
FeedsExecutable:: |
public | function | Constructs a new FeedsExecutable object. | 1 |
FeedsExecutableInterface:: |
constant | Parameter passed when starting a new import. | ||
FeedsExecutableInterface:: |
constant | Parameter passed when cleaning. | ||
FeedsExecutableInterface:: |
constant | Parameter passed when fetching. | ||
FeedsExecutableInterface:: |
constant | Parameter passed when finishing. | ||
FeedsExecutableInterface:: |
constant | Parameter passed when parsing. | ||
FeedsExecutableInterface:: |
constant | Parameter passed when processing. | ||
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |