You are here

final class SchedulerEvents in Scheduler 8

Contains all events dispatched by Scheduler.

Ideally the namespace should have been Drupal\scheduler\Event and all the event-related files stored in a src/Event folder. This cannot be chnaged now as it would break the API which is being used by 3rd-party modules subscribing to scheduler's events.

Hierarchy

Expanded class hierarchy of SchedulerEvents

2 files declare their use of SchedulerEvents
EventSubscriber.php in tests/modules/scheduler_api_test/src/EventSubscriber.php
scheduler.module in ./scheduler.module
Scheduler publishes and unpublishes nodes on dates specified by the user.

File

src/SchedulerEvents.php, line 13

Namespace

Drupal\scheduler
View source
final class SchedulerEvents {

  /**
   * The event triggered after a node is published immediately.
   *
   * This event allows modules to react after a node is published immediately.
   * The event listener method receives a \Drupal\Core\Entity\EntityInterface
   * instance.
   *
   * @Event
   *
   * @see \Drupal\scheduler\SchedulerEvent
   *
   * @var string
   */
  const PUBLISH_IMMEDIATELY = 'scheduler.publish_immediately';

  /**
   * The event triggered after a node is published via cron.
   *
   * This event allows modules to react after a node is published. The event
   * listener method receives a \Drupal\Core\Entity\EntityInterface instance.
   *
   * @Event
   *
   * @see \Drupal\scheduler\SchedulerEvent
   *
   * @var string
   */
  const PUBLISH = 'scheduler.publish';

  /**
   * The event triggered before a node is published immediately.
   *
   * This event allows modules to react before a node is published immediately.
   * The event listener method receives a \Drupal\Core\Entity\EntityInterface
   * instance.
   *
   * @Event
   *
   * @see \Drupal\scheduler\SchedulerEvent
   *
   * @var string
   */
  const PRE_PUBLISH_IMMEDIATELY = 'scheduler.pre_publish_immediately';

  /**
   * The event triggered before a node is published via cron.
   *
   * This event allows modules to react before a node is published. The event
   * listener method receives a \Drupal\Core\Entity\EntityInterface
   * instance.
   *
   * @Event
   *
   * @see \Drupal\scheduler\SchedulerEvent
   *
   * @var string
   */
  const PRE_PUBLISH = 'scheduler.pre_publish';

  /**
   * The event triggered before a node is unpublished via cron.
   *
   * This event allows modules to react before a node is unpublished. The
   * event listener method receives a \Drupal\Core\Entity\EntityInterface
   * instance.
   *
   * @Event
   *
   * @see \Drupal\scheduler\SchedulerEvent
   *
   * @var string
   */
  const PRE_UNPUBLISH = 'scheduler.pre_unpublish';

  /**
   * The event triggered after a node is unpublished via cron.
   *
   * This event allows modules to react after a node is unpublished. The event
   * listener method receives a \Drupal\Core\Entity\EntityInterface instance.
   *
   * @Event
   *
   * @see \Drupal\scheduler\SchedulerEvent
   *
   * @var string
   */
  const UNPUBLISH = 'scheduler.unpublish';

}

Members

Namesort descending Modifiers Type Description Overrides
SchedulerEvents::PRE_PUBLISH constant The event triggered before a node is published via cron.
SchedulerEvents::PRE_PUBLISH_IMMEDIATELY constant The event triggered before a node is published immediately.
SchedulerEvents::PRE_UNPUBLISH constant The event triggered before a node is unpublished via cron.
SchedulerEvents::PUBLISH constant The event triggered after a node is published via cron.
SchedulerEvents::PUBLISH_IMMEDIATELY constant The event triggered after a node is published immediately.
SchedulerEvents::UNPUBLISH constant The event triggered after a node is unpublished via cron.