class ScheduledTransitionsNewRevisionEvent in Scheduled Transitions 8
Same name and namespace in other branches
- 2.x src/Event/ScheduledTransitionsNewRevisionEvent.php \Drupal\scheduled_transitions\Event\ScheduledTransitionsNewRevisionEvent
Used to determine the new revision for a transition.
Hierarchy
- class \Drupal\scheduled_transitions\Event\ScheduledTransitionsNewRevisionEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ScheduledTransitionsNewRevisionEvent
See also
\Drupal\scheduled_transitions\Event\ScheduledTransitionsEvents
2 files declare their use of ScheduledTransitionsNewRevisionEvent
- ScheduledTransitionsNewRevision.php in src/
EventSubscriber/ ScheduledTransitionsNewRevision.php - ScheduledTransitionsRunner.php in src/
ScheduledTransitionsRunner.php
File
- src/
Event/ ScheduledTransitionsNewRevisionEvent.php, line 14
Namespace
Drupal\scheduled_transitions\EventView source
class ScheduledTransitionsNewRevisionEvent extends Event {
/**
* Scheduled transition entity.
*
* @var \Drupal\scheduled_transitions\Entity\ScheduledTransitionInterface
*/
protected $scheduledTransition;
/**
* The new revision to transition.
*
* @var \Drupal\Core\Entity\RevisionableInterface|null
*/
protected $newRevision;
/**
* Constructs a new ScheduledTransitionsNewRevisionEvent.
*
* @param \Drupal\scheduled_transitions\Entity\ScheduledTransitionInterface $scheduledTransition
* Scheduled transition entity.
*/
public function __construct(ScheduledTransitionInterface $scheduledTransition) {
$this->scheduledTransition = $scheduledTransition;
}
/**
* Gets the scheduled transition entity.
*
* @return \Drupal\scheduled_transitions\Entity\ScheduledTransitionInterface
* A scheduled transition entity.
*/
public function getScheduledTransition() : ScheduledTransitionInterface {
return $this->scheduledTransition;
}
/**
* Get the new revision.
*
* @return \Drupal\Core\Entity\RevisionableInterface|null
* The new revision.
*/
public function getNewRevision() : ?RevisionableInterface {
return $this->newRevision;
}
/**
* Sets the new revision.
*
* @param \Drupal\Core\Entity\RevisionableInterface $newRevision
* The new revision.
*/
public function setNewRevision(RevisionableInterface $newRevision) : void {
$this->newRevision = $newRevision;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ScheduledTransitionsNewRevisionEvent:: |
protected | property | The new revision to transition. | |
ScheduledTransitionsNewRevisionEvent:: |
protected | property | Scheduled transition entity. | |
ScheduledTransitionsNewRevisionEvent:: |
public | function | Get the new revision. | |
ScheduledTransitionsNewRevisionEvent:: |
public | function | Gets the scheduled transition entity. | |
ScheduledTransitionsNewRevisionEvent:: |
public | function | Sets the new revision. | |
ScheduledTransitionsNewRevisionEvent:: |
public | function | Constructs a new ScheduledTransitionsNewRevisionEvent. |