class SchedulerEvent in Scheduler 8
Wraps a scheduler event for event listeners.
Hierarchy
- class \Drupal\scheduler\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\scheduler\SchedulerEvent
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\schedulerView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EventBase:: |
public | property | The node which is being processed. | |
EventBase:: |
public | function | Constructs the object. | |
SchedulerEvent:: |
public | function | Gets node object. | |
SchedulerEvent:: |
public | function | Sets the node object. |