getTransitionName() публичный статический Метод

gets the transition name by two state names, using the default convention for a transition name (which is concatenating state-from to state-to with '_to_')
public static getTransitionName ( string $from, string $to ) : string
$from string the state from which the transition is made
$to string the state to which the transition will be made
Результат string _to_
Пример #1
0
 /**
  * @test
  */
 public function shouldReturnCorrectTransitionName()
 {
     $from = 'state-from';
     $to = 'state-to';
     $this->assertEquals($from . Utils::STATE_CONCATENATOR . $to, Utils::getTransitionName($from, $to));
 }
 /**
  * get the transition name.
  * the transition name is always unique for a statemachine
  * since it constists of <state_from>_to_<state_to>
  *
  * @return string
  */
 public function getName()
 {
     $name = Utils::getTransitionName($this->getStateFrom()->getName(), $this->getStateTo()->getName());
     return $name;
 }