You are here

class FeedsBatchExecutable in Feeds 8.3

Import feeds using the batch API.

Hierarchy

Expanded class hierarchy of FeedsBatchExecutable

File

src/FeedsBatchExecutable.php, line 10

Namespace

Drupal\feeds
View 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

Namesort descending Modifiers Type Description Overrides
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
EventDispatcherTrait::$_eventDispatcher private property The event dispatcher service.
EventDispatcherTrait::dispatchEvent protected function Dispatches an event.
EventDispatcherTrait::getEventDispatcher protected function Returns the event dispatcher service.
EventDispatcherTrait::setEventDispatcher public function Sets the event dispatcher service to use.
FeedsBatchExecutable::createBatch protected function Creates a new batch object. Overrides FeedsExecutable::createBatch
FeedsBatchExecutable::finish protected function Finalizes the import. Overrides FeedsExecutable::finish
FeedsExecutable::$accountSwitcher protected property The account switcher.
FeedsExecutable::$entityTypeManager protected property The entity type manager.
FeedsExecutable::$messenger protected property The messenger service.
FeedsExecutable::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create 1
FeedsExecutable::doClean protected function Cleans an entity.
FeedsExecutable::doFetch protected function Invokes the fetch stage.
FeedsExecutable::doParse protected function Parses.
FeedsExecutable::doProcess protected function Processes an item.
FeedsExecutable::handleException protected function Handles an exception during importing. 1
FeedsExecutable::import protected function Begin an import.
FeedsExecutable::processItem public function Processes a stage of an import. Overrides FeedsExecutableInterface::processItem
FeedsExecutable::switchAccount protected function Safely switches to another account.
FeedsExecutable::__construct public function Constructs a new FeedsExecutable object. 1
FeedsExecutableInterface::BEGIN constant Parameter passed when starting a new import.
FeedsExecutableInterface::CLEAN constant Parameter passed when cleaning.
FeedsExecutableInterface::FETCH constant Parameter passed when fetching.
FeedsExecutableInterface::FINISH constant Parameter passed when finishing.
FeedsExecutableInterface::PARSE constant Parameter passed when parsing.
FeedsExecutableInterface::PROCESS constant Parameter passed when processing.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.