src/Twig/JqueryValidationExtension.php
protected function buttonsViewData(FormRuleContext $context)
    {
        $buttonNames = $context->getButtons();

        $buttons = array();
        foreach ($buttonNames as $name) {
            $groups = $context->getGroup($name);

            $buttons[] = array(
                'name' => $name,
                'cancel' => count($groups) === 0,
                'validation_groups' => $groups,
            );
        }

        return $buttons;
    }
protected function buttonsViewData(FormRuleContext $context)
    {
        $buttonNames = $context->getButtons();

        $buttons = array();
        foreach ($buttonNames as $name) {
            $groups = $context->getGroup($name);

            $buttons[] = array(
                'name' => $name,
                'cancel' => count($groups) === 0,
                'validation_groups' => $groups,
            );
        }

        return $buttons;
    }
protected function buttonsViewData ( FormRuleContext $ context ) { $ buttonNames = $ context -> getButtons ( ) ; $ buttons = array ( ) ; foreach ( $ buttonNames as $ name ) { $ groups = $ context -> getGroup ( $ name ) ; $ buttons [ ] = array ( 'name' => $ name , 'cancel' => count ( $ groups ) === 0 , 'validation_groups' => $ groups , ) ; } return $ buttons ; }
Transform the buttons in the given form into a array that can easily be used by twig.

@param FormRuleContext $context
@return array
Transform the buttons in the given form into a array that can easily be used by twig .