original_string: private static function getValidationGroups(FormInterface $form)
      {
          // Determine the clicked button of the complete form tree
          $clickedButton = null;
  
          if (method_exists($form, 'getClickedButton')) {
              $clickedButton = $form->getClickedButton();
          }
  
          if (null !== $clickedButton) {
              $groups = $clickedButton->getConfig()->getOption('validation_groups');
  
              if (null !== $groups) {
                  return self::resolveValidationGroups($groups, $form);
              }
          }
  
          do {
              $groups = $form->getConfig()->getOption('validation_groups');
  
              if (null !== $groups) {
                  return self::resolveValidationGroups($groups, $form);
              }
  
              $form = $form->getParent();
          } while (null !== $form);
  
          return [Constraint::DEFAULT_GROUP];
      }
code: private static function getValidationGroups(FormInterface $form)
      {
          // Determine the clicked button of the complete form tree
          $clickedButton = null;
  
          if (method_exists($form, 'getClickedButton')) {
              $clickedButton = $form->getClickedButton();
          }
  
          if (null !== $clickedButton) {
              $groups = $clickedButton->getConfig()->getOption('validation_groups');
  
              if (null !== $groups) {
                  return self::resolveValidationGroups($groups, $form);
              }
          }
  
          do {
              $groups = $form->getConfig()->getOption('validation_groups');
  
              if (null !== $groups) {
                  return self::resolveValidationGroups($groups, $form);
              }
  
              $form = $form->getParent();
          } while (null !== $form);
  
          return [Constraint::DEFAULT_GROUP];
      }
code_tokens: private static function getValidationGroups ( FormInterface $ form ) { // Determine the clicked button of the complete form tree $ clickedButton = null ; if ( method_exists ( $ form , 'getClickedButton' ) ) { $ clickedButton = $ form -> getClickedButton ( ) ; } if ( null !== $ clickedButton ) { $ groups = $ clickedButton -> getConfig ( ) -> getOption ( 'validation_groups' ) ; if ( null !== $ groups ) { return self :: resolveValidationGroups ( $ groups , $ form ) ; } } do { $ groups = $ form -> getConfig ( ) -> getOption ( 'validation_groups' ) ; if ( null !== $ groups ) { return self :: resolveValidationGroups ( $ groups , $ form ) ; } $ form = $ form -> getParent ( ) ; } while ( null !== $ form ) ; return [ Constraint :: DEFAULT_GROUP ] ; }
docstring: Returns the validation groups of the given form.
  
  @return string|GroupSequence|(string|GroupSequence)[] The validation groups
docstring_tokens: Returns the validation groups of the given form .