You are here

class SchedulerEvent in Scheduler 8

Wraps a scheduler event for event listeners.

Hierarchy

  • class \Drupal\scheduler\EventBase extends \Drupal\Component\EventDispatcher\Event

Expanded class hierarchy of SchedulerEvent

2 files declare their use of SchedulerEvent
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/SchedulerEvent.php, line 10

Namespace

Drupal\scheduler
View source
class SchedulerEvent extends EventBase {

  /**
   * Gets node object.
   *
   * @return \Drupal\node\NodeInterface
   *   The node object that caused the event to fire.
   */
  public function getNode() {
    return $this->node;
  }

  /**
   * Sets the node object.
   *
   * @param \Drupal\node\NodeInterface $node
   *   The node object that caused the event to fire.
   */
  public function setNode(NodeInterface $node) {
    $this->node = $node;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EventBase::$node public property The node which is being processed.
EventBase::__construct public function Constructs the object.
SchedulerEvent::getNode public function Gets node object.
SchedulerEvent::setNode public function Sets the node object.