@param int $transitionId
@param bool $fullObject

@throws EntityNotFoundException

@return array
331912
public function resolveTransitionItems($transitionId, $fullObject = false)
    {
        $transition = $this->transitionManager->findById($transitionId);

        if ($transition === null) {
            throw new EntityNotFoundException(Transition::class, $transitionId);
        }
        $resolvedItems = [];

        /** @var TransitionItem $item */
        foreach ($transition->getItems() as $index => $item) {
            if ($fullObject) {
                $itemRepository = $this->entityManager->getRepository($item->getItemClass());
                $resolvedItem = $itemRepository->find($item->getItemId());

                if ($resolvedItem === null) {
                    continue;
                }

                $resolvedItems[$index]['item'] = $resolvedItem;
            }
            $resolvedItems[$index]['itemId'] = $item->getItemId();
            $resolvedItems[$index]['quantity'] = $item->getItemCount();
        }

        return $resolvedItems;
    }
836525
public function getFullTagData($tagId, array $translations = null, $useAlwaysAvailable = true)
    {
        try {
            return $this->innerGateway->getFullTagData($tagId, $translations, $useAlwaysAvailable);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1052792
public function getTransitionStatusIds($transitionName)
    {
        $temp = explode(self::STATUS_SEPARATOR, $transitionName);

        $statuses['from'] = $temp[0];
        $statuses['to'] = $temp[1];

        return $statuses;
    }
738270
@Override
    @Transactional
    public Restoration transitionRestoreStatus(String restorationId,
                                               RestoreStatus status,
                                               String message)
        throws InvalidStateTransitionException, RestorationNotFoundException {

        Restoration restoration = getRestoration(restorationId);
        return _transitionRestoreStatus(status, message, restoration);
    }
313268
public function getTransitionsForPageUrl($pageUrl, $segment = '', $limitBeforeGrouping = '', array $optional = [])
    {
        return $this->_request('Transitions.getTransitionsForPageTitle', [
            'pageUrl' => $pageUrl,
            'segment' => $segment,
            'limitBeforeGrouping' => $limitBeforeGrouping,
        ], $optional);
    }
708836
public function call(TransitionEvent $event)
    {
        if (!isset($this->specs['args'])) {
            $args = array($event);
        } else {
            $expr = new ExpressionLanguage();
            $args = array_map(
                function($arg) use($expr, $event) {
                    if (!is_string($arg)) {
                        return $arg;
                    }

                    return $expr->evaluate($arg, array(
                        'object' => $event->getStateMachine()->getObject(),
                        'event'  => $event
                    ));
                }, $this->specs['args']
            );
        }

        $callable = $this->filterCallable($this->callable, $event);

        return call_user_func_array($callable, $args);
    }
283373
public function applyTransition(Workflow $workflow, AbstractSubject $subject, string $transitionName): bool
    {
        try {
            $workflow->apply($subject, $transitionName);
        } catch (TransitionException $exception) {
            return false;
        }

        return true;
    }
815867
protected function getEntity($entityId)
    {
        $entity = $this->getRepository()->get($entityId);
        if (!$entity instanceof EntityInterface) {
            throw new EntityNotFoundException(
                "There are no entities with provided entity ID."
            );
        }
        return $entity;
    }
165983
public function getTransitions($object, $graph = 'default', $asObject = false)
    {
        if (!$asObject) {
            return $this->getStateMachine($object, $graph)->getCurrentState()->getTransitions();
        }

        $stateMachine = $this->getStateMachine($object, $graph);

        return array_map(
            function ($transition) use ($stateMachine) {
                return $stateMachine->getTransition($transition);
            },
            $stateMachine->getCurrentState()->getTransitions()
        );
    }
1372344
public function getTransitions($alias, $id, $hydrationMode = self::HYDRATION_MODE_OBJECTS)
    {
        $current = $this->getCurrentTransition($alias, $id, $hydrationMode);

        if ($current === null) {
            throw new EntityNotFoundException($alias, $id);
        }

        $currentTransition = $current->getTransition();

        $allTransitions['current'] = $current;

        // Find all previous transitions.
        if ($currentTransition) {
            $allTransitions['previous'] = array_reverse(
                $this->getPreviousTransitions(
                    $currentTransition->getSource(),
                    $currentTransition->getSourceId(),
                    $hydrationMode
                )
            );
        }

        // Find all following transitions.
        $allTransitions['following'] = $this->getFollowingTransitions(
            $alias,
            $id,
            $hydrationMode
        );

        return $allTransitions;
    }
1111824
public function exportItem($id, $fullExport = false)
    {
        $volume = Craft::$app->volumes->getVolumeById($id);
        if (!$volume) {
            return false;
        }

        $this->addManifest($volume->handle);
        $newVolume = [
            'name' => $volume->name,
            'handle' => $volume->handle,
            'type' => $volume->className(),
            'sortOrder' => $volume->sortOrder,
            'typesettings' => $volume->settings,
        ];

        if ($volume->hasUrls){
            $newVolume['hasUrls'] = 1;
            $newVolume['url'] = $volume->url;
        }

        if ($fullExport) {
            $newVolume['fieldLayout'] = array();
            $fieldLayout = $volume->getFieldLayout();

            foreach ($fieldLayout->getTabs() as $tab) {
                $newVolume['fieldLayout'][$tab->name] = array();
                foreach ($tab->getFields() as $tabField) {

                    $newVolume['fieldLayout'][$tab->name][] = $tabField->handle;
                    if ($tabField->required) {
                        $newVolume['requiredFields'][] =$tabField->handle;
                    }
                }
            }
         }

        if ($fullExport) {
            $newVolume = $this->onBeforeExport($volume, $newVolume);
        }

        return $newVolume;
    }
880709
public Transition getTransition(Long fromId, Integer eventType, String completionCode) {
        Transition ret = null;
        for (Transition transition : getTransitions()) {
            if (transition.getFromId().equals(fromId)
                    && transition.match(eventType, completionCode)) {
                if (ret == null) ret = transition;
                else {
                    throw new IllegalStateException("Multiple matching work transitions when one expected:\n"
                            + " processId: " + getId() + " fromId: " + fromId + " eventType: "
                            + eventType + "compCode: " + completionCode);
                }
            }
        }
        return ret;
    }
1048567
public function getTransitions()
    {
        if (count($this->transitions) == 0 && !$this->isInitialType() && !$this->isExceptionType()) {
            foreach ($this->properties['transitions_from'] as $transition) {
                array_push($this->transitions, new Transition($this, $transition));
            }

            if (count($this->transitions) == 0) {
                throw new StatusException('No transitions available', 100, null);
            }
        } elseif ($this->isInitialType() || $this->isExceptionType()) {
            $this->transitions = [];
        }

        return $this->transitions;
    }
187010
public Transition getWorkTransitionVO(Long pWorkTransId) {
         if(this.transitions == null){
            return null;
        }
        for(int i=0; i<transitions.size(); i++){
            if(pWorkTransId.longValue() == transitions.get(i).getId().longValue()){
                return transitions.get(i);
            }
        }
        return null;

    }
14961
public function dispatchTransitionEvents(
        MachineInterface $machine,
        $object,
        StateLineStack $stateLineStack,
        Transition $transition
    ) {
        $this
            ->eventDispatcher
            ->dispatch(
                ElcodiStateTransitionMachineEvents::ALL_TRANSITIONS,
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{state_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getStart()->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION_FROM_STATE
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{state_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getFinal()->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION_TO_STATE
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );

        $this
            ->eventDispatcher
            ->dispatch(
                str_replace(
                    [
                        '{machine_id}',
                        '{transition_name}',
                    ],
                    [
                        $machine->getId(),
                        $transition->getName(),
                    ],
                    ElcodiStateTransitionMachineEvents::TRANSITION
                ),
                TransitionEvent::create(
                    $object,
                    $stateLineStack,
                    $transition
                )
            );
    }
769494
public function getTransitionsByName($transitionName)
    {
        return array_filter(
            $this->transitions,
            function (Transition $transition) use ($transitionName) {
                return $transition->getName() === $transitionName;
            }
        );
    }
122234
public function actionComplete(WorkflowTransition $transition)
    {
        $this->MemberID = Member::currentUserID();
        $this->write();
        $this->extend('onActionComplete', $transition);
    }