Programming Language PHP

Namespace Oro\Bundle\WorkflowBundle\Model

Class Transition

Total Examples 2

2 code examples of PHP Oro\Bundle\WorkflowBundle\Model\Transition extracted from open source projects

Was this example useful?
0
                                                    public function processTransitionTranslations(Transition $transition)
    {
        $buttonLabel = $this->trans($transition->getButtonLabel());
        if (null !== $buttonLabel) {
            $transition->setButtonLabel($buttonLabel);
        } else {
            $transition->setButtonLabel($this->trans($transition->getLabel(), true));
        }

        $buttonTitle = $this->trans($transition->getButtonTitle());
        if (null !== $buttonTitle) {
            $transition->setButtonTitle($buttonTitle);
        } else {
            $transition->setButtonTitle(null);
        }

        $frontendOptions = $transition->getFrontendOptions();
        if (empty($frontendOptions['message']['title'])) {
            $frontendOptions['message']['title'] = $transition->getButtonLabel();
        }
        $transition->setFrontendOptions($frontendOptions);
    }
                                            
Was this example useful?
0
                                                    protected function processActions(Transition $transition, array $actions)
    {
        if ($transition->getDisplayType() === WorkflowConfiguration::TRANSITION_DISPLAY_TYPE_PAGE) {
            $actions = array_merge([
                [
                    '@resolve_destination_page' => $transition->getDestinationPage(),
                ],
            ], $actions);
        }

        if (empty($actions)) {
            return;
        }

        $transition->setAction($this->actionFactory->create(ConfigurableAction::ALIAS, $actions));
    }
                                            
Transition's Other Methods
Transition's Other Methods