public function getFrontEndWorkflowActions()
    {
        $action    = $this->CurrentAction();
        $options   = $action->getValidTransitions();
        $actions   = new FieldList();

        $hide_disabled_actions_on_frontend = $this->config()->hide_disabled_actions_on_frontend;

        foreach ($options as $option) {
            $btn = new FormAction("transition_{$option->ID}", $option->Title);

            // add cancel class to passive actions, this prevents js validation (using jquery.validate)
            if ($option->Type == 'Passive') {
                $btn->addExtraClass('cancel');
            }

            // disable the button if canExecute() returns false
            if (!$option->canExecute($this)) {
                if ($hide_disabled_actions_on_frontend) {
                    continue;
                }

                $btn = $btn->performReadonlyTransformation();
                $btn->addExtraClass('hide');
            }

            $actions->push($btn);
        }

        $action->updateFrontEndWorkflowActions($actions);

        return $actions;
    }
public function getFrontEndWorkflowActions()
    {
        $action    = $this->CurrentAction();
        $options   = $action->getValidTransitions();
        $actions   = new FieldList();

        $hide_disabled_actions_on_frontend = $this->config()->hide_disabled_actions_on_frontend;

        foreach ($options as $option) {
            $btn = new FormAction("transition_{$option->ID}", $option->Title);

            // add cancel class to passive actions, this prevents js validation (using jquery.validate)
            if ($option->Type == 'Passive') {
                $btn->addExtraClass('cancel');
            }

            // disable the button if canExecute() returns false
            if (!$option->canExecute($this)) {
                if ($hide_disabled_actions_on_frontend) {
                    continue;
                }

                $btn = $btn->performReadonlyTransformation();
                $btn->addExtraClass('hide');
            }

            $actions->push($btn);
        }

        $action->updateFrontEndWorkflowActions($actions);

        return $actions;
    }
public function getFrontEndWorkflowActions ( ) { $ action = $ this -> CurrentAction ( ) ; $ options = $ action -> getValidTransitions ( ) ; $ actions = new FieldList ( ) ; $ hide_disabled_actions_on_frontend = $ this -> config ( ) -> hide_disabled_actions_on_frontend ; foreach ( $ options as $ option ) { $ btn = new FormAction ( "transition_{$option->ID}" , $ option -> Title ) ; // add cancel class to passive actions, this prevents js validation (using jquery.validate) if ( $ option -> Type == 'Passive' ) { $ btn -> addExtraClass ( 'cancel' ) ; } // disable the button if canExecute() returns false if ( ! $ option -> canExecute ( $ this ) ) { if ( $ hide_disabled_actions_on_frontend ) { continue ; } $ btn = $ btn -> performReadonlyTransformation ( ) ; $ btn -> addExtraClass ( 'hide' ) ; } $ actions -> push ( $ btn ) ; } $ action -> updateFrontEndWorkflowActions ( $ actions ) ; return $ actions ; }
Gets Transitions for display as Front-End Form Actions

@return FieldList
Gets Transitions for display as Front - End Form Actions