Example #1
0
 /**
  * @param \Spryker\Zed\Oms\Business\Process\StateInterface $state
  *
  * @return bool
  */
 protected function hasOnlySelfReferences(StateInterface $state)
 {
     $hasOnlySelfReferences = true;
     $transitions = $state->getOutgoingTransitions();
     foreach ($transitions as $transition) {
         if ($transition->getTarget()->getName() !== $state->getName()) {
             $hasOnlySelfReferences = false;
             break;
         }
     }
     return $hasOnlySelfReferences;
 }
Example #2
0
 /**
  * @param \Spryker\Zed\Oms\Business\Process\StateInterface $state
  *
  * @return void
  */
 public function addState(StateInterface $state)
 {
     $this->states[$state->getName()] = $state;
 }