You are here

public function BlockForm::themeSwitch in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/BlockForm.php \Drupal\block\BlockForm::themeSwitch()

Handles switching the available regions based on the selected theme.

File

core/modules/block/src/BlockForm.php, line 192
Contains \Drupal\block\BlockForm.

Class

BlockForm
Provides form for block instance forms.

Namespace

Drupal\block

Code

public function themeSwitch($form, FormStateInterface $form_state) {
  $form['region']['#options'] = system_region_list($form_state
    ->getValue('theme'), REGIONS_VISIBLE);
  return $form['region'];
}