Files
Chamilo/vendor/winzou/state-machine/src/SM/Event/TransitionEvent.php
T
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

106 lines
2.0 KiB
PHP

<?php
/*
* This file is part of the StateMachine package.
*
* (c) Alexandre Bacco
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SM\Event;
use SM\StateMachine\StateMachineInterface;
use Symfony\Component\EventDispatcher\Event;
class TransitionEvent extends Event
{
/**
* @var string
*/
protected $transition;
/**
* @var string
*/
protected $fromState;
/**
* @var array
*/
protected $config;
/**
* @var StateMachineInterface
*/
protected $stateMachine;
/**
* @var bool
*/
protected $rejected = false;
/**
* @param string $transition Name of the transition being applied
* @param string $fromState State from which the transition is applied
* @param array $config Configuration of the transition
* @param StateMachineInterface $stateMachine State machine
*/
public function __construct($transition, $fromState, array $config, StateMachineInterface $stateMachine)
{
$this->transition = $transition;
$this->fromState = $fromState;
$this->config = $config;
$this->stateMachine = $stateMachine;
}
/**
* @return string
*/
public function getTransition()
{
return $this->transition;
}
/**
* @return array
*/
public function getConfig()
{
return $this->config;
}
/**
* @return StateMachineInterface
*/
public function getStateMachine()
{
return $this->stateMachine;
}
/**
* @return string
*/
public function getState()
{
return $this->fromState;
}
/**
* @param bool $reject
*/
public function setRejected($reject = true)
{
$this->rejected = (bool) $reject;
}
/**
* @return bool
*/
public function isRejected()
{
return $this->rejected;
}
}