示例#1
0
 /**
  * If state identical with another
  *
  * @param StateInterface $comparedState
  * @return bool
  */
 public function isIdentical(StateInterface $comparedState)
 {
     return $this->getName() == $comparedState->getName() && $this->getType() == $comparedState->getType();
 }
示例#2
0
文件: Event.php 项目: spryker/Oms
 /**
  * @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;
 }