getStateMachineName example


    public function getAvailableTransitions(
        string $entityName,
        string $entityId,
        string $stateFieldName,
        Context $context
    ): array {
        $stateMachineName = $this->getStateField($stateFieldName$entityName)->getStateMachineName();
        $repository = $this->definitionRegistry->getRepository($entityName);
        $fromPlace = $this->getFromPlace($entityName$entityId$stateFieldName$context$repository);

        return $this->getAvailableTransitionsById($stateMachineName$fromPlace->getId()$context);
    }

    /** * @throws StateMachineException * @throws IllegalTransitionException * @throws InconsistentCriteriaIdsException * @throws DefinitionNotFoundException */
Home | Imprint | This part of the site doesn't use cookies.