You are here

class InitEvent in Feeds 8.3

Fired before a regular event is being fired.

This allows listeners to lazily set themselves up.

Hierarchy

  • class \Drupal\feeds\Event\EventBase extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of InitEvent

6 files declare their use of InitEvent
FeedClearHandler.php in src/FeedClearHandler.php
FeedExpireHandler.php in src/FeedExpireHandler.php
FeedsExecutable.php in src/FeedsExecutable.php
FeedsSubscriber.php in tests/modules/feeds_test_events/src/EventSubscriber/FeedsSubscriber.php
LazySubscriber.php in src/EventSubscriber/LazySubscriber.php

... See full list

File

src/Event/InitEvent.php, line 12

Namespace

Drupal\feeds\Event
View source
class InitEvent extends EventBase {

  /**
   * The stage to initialize.
   *
   * @var string
   */
  protected $stage;

  /**
   * Constructs an InitEvent object.
   *
   * @param \Drupal\feeds\FeedInterface $feed
   *   The feed.
   * @param string $stage
   *   (optional) The stage to initialize. Defaults to an empty string.
   */
  public function __construct(FeedInterface $feed, $stage = '') {
    $this->feed = $feed;
    $this->stage = $stage;
  }

  /**
   * Returns the stage to initialize.
   *
   * @return string
   *   The stage to initialize.
   */
  public function getStage() {
    return $this->stage;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EventBase::$feed protected property The feed being imported.
EventBase::getFeed public function Returns the feed.
InitEvent::$stage protected property The stage to initialize.
InitEvent::getStage public function Returns the stage to initialize.
InitEvent::__construct public function Constructs an InitEvent object. Overrides EventBase::__construct