You are here

public function FieldValidationRuleSetAddForm::updateBundle in Field Validation 8

Handles switching the configuration type selector.

File

src/Form/FieldValidationRuleSetAddForm.php, line 60

Class

FieldValidationRuleSetAddForm
Controller for FieldValidationRuleSet addition forms.

Namespace

Drupal\field_validation\Form

Code

public function updateBundle($form, FormStateInterface $form_state) {
  $form['bundle']['#default_value'] = '';
  $form['bundle']['#options'] = $this
    ->findBundle($form_state
    ->getValue('entity_type'));
  return $form['bundle'];
}