/**
  * {@inheritdoc}
  */
 public function isTransitionAllowed(ModerationStateInterface $from, ModerationStateInterface $to)
 {
     $allowed_transitions = $this->calculatePossibleTransitions();
     if (isset($allowed_transitions[$from->id()])) {
         return in_array($to->id(), $allowed_transitions[$from->id()], TRUE);
     }
     return FALSE;
 }
 /**
  * {@inheritdoc}
  */
 protected function getTransitionFromStates(ModerationStateInterface $from, ModerationStateInterface $to)
 {
     if ($from->id() === 'draft' && $to->id() === 'draft') {
         return $this->transitionStorage()->loadMultiple(['draft__draft'])[0];
     }
 }