/** * If state identical with another * * @param StateInterface $comparedState * @return bool */ public function isIdentical(StateInterface $comparedState) { return $this->getName() == $comparedState->getName() && $this->getType() == $comparedState->getType(); }
/** * @param \Spryker\Zed\Oms\Business\Process\StateInterface $sourceState * * @return \Spryker\Zed\Oms\Business\Process\TransitionInterface[] */ public function getTransitionsBySource(StateInterface $sourceState) { $transitions = []; foreach ($this->transitions as $transition) { if ($transition->getSource()->getName() === $sourceState->getName()) { $transitions[] = $transition; } } return $transitions; }