class WorkbenchModerationTransitionEvent in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/Event/WorkbenchModerationTransitionEvent.php \Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent
Hierarchy
- class \Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of WorkbenchModerationTransitionEvent
See also
\Drupal\workbench_moderation\ModerationStateEvents
1 file declares its use of WorkbenchModerationTransitionEvent
File
- src/
Event/ WorkbenchModerationTransitionEvent.php, line 11
Namespace
Drupal\workbench_moderation\EventView source
class WorkbenchModerationTransitionEvent extends Event {
/**
* The entity which was changed.
*
* @var \Drupal\Core\Entity\ContentEntityInterface
*/
protected $entity;
/**
* @var string
*/
protected $stateBefore;
/**
* @var string
*/
protected $stateAfter;
/**
* Creates a new WorkbenchModerationTransitionEvent instance.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity which was changed.
* @param string $state_before
* The state before the transition.
* @param string $state_after
* The state after the transition.
*/
public function __construct(ContentEntityInterface $entity, $state_before, $state_after) {
$this->entity = $entity;
$this->stateBefore = $state_before;
$this->stateAfter = $state_after;
}
/**
* Returns the changed entity.
*
* @return \Drupal\Core\Entity\ContentEntityInterface
*/
public function getEntity() {
return $this->entity;
}
/**
* @return string
*/
public function getStateBefore() {
return $this->stateBefore;
}
/**
* @return string
*/
public function getStateAfter() {
return $this->stateAfter;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WorkbenchModerationTransitionEvent:: |
protected | property | The entity which was changed. | |
WorkbenchModerationTransitionEvent:: |
protected | property | ||
WorkbenchModerationTransitionEvent:: |
protected | property | ||
WorkbenchModerationTransitionEvent:: |
public | function | Returns the changed entity. | |
WorkbenchModerationTransitionEvent:: |
public | function | ||
WorkbenchModerationTransitionEvent:: |
public | function | ||
WorkbenchModerationTransitionEvent:: |
public | function | Creates a new WorkbenchModerationTransitionEvent instance. |