/**
* Loads a issue state machine.
*
* @param \Kreta\Component\Issue\Model\Interfaces\IssueInterface $issue The issue
* @param \Kreta\Component\Workflow\Model\Interfaces\StatusInterface[] $statuses A collection of
* statuses
* @param \Kreta\Component\Workflow\Model\Interfaces\StatusTransitionInterface[] $transitions A collection of
* transitions
*
* @return $this self Object
*/
public function load(IssueInterface $issue, $statuses, $transitions)
{
$this->statuses = $statuses;
$this->transitions = $transitions;
parent::__construct($issue, null);
$this->createLoader()->load($this);
$this->initialize();
return $this;
}