BlockForm::themeSwitch

public BlockForm::themeSwitch($form, FormStateInterface $form_state)

Handles switching the available regions based on the selected theme.

File

core/modules/block/src/BlockForm.php, line 210

Class

BlockForm
Provides form for block instance forms.

Namespace

Drupal\block

Code

1
2
3
4
public function themeSwitch($form, FormStateInterface $form_state) {
  $form['region']['#options'] = system_region_list($form_state->getValue('theme'), REGIONS_VISIBLE);
  return $form['region'];
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.