function BlockForm::themeSwitch
Handles switching the available regions based on the selected theme.
File
-
core/
modules/ block/ src/ BlockForm.php, line 212
Class
- BlockForm
- Provides form for block instance forms.
Namespace
Drupal\blockCode
public function themeSwitch($form, FormStateInterface $form_state) {
$form['region']['#options'] = system_region_list($form_state->getValue('theme'), REGIONS_VISIBLE);
return $form['region'];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.