protected function MoveBlockForm::getSelectedRegion in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Form/MoveBlockForm.php \Drupal\layout_builder\Form\MoveBlockForm::getSelectedRegion()
Gets the selected region.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
Return value
string The current region name.
2 calls to MoveBlockForm::getSelectedRegion()
- MoveBlockForm::buildForm in core/
modules/ layout_builder/ src/ Form/ MoveBlockForm.php - Builds the move block form.
- MoveBlockForm::submitForm in core/
modules/ layout_builder/ src/ Form/ MoveBlockForm.php - Form submission handler.
File
- core/
modules/ layout_builder/ src/ Form/ MoveBlockForm.php, line 295
Class
- MoveBlockForm
- Provides a form for moving a block.
Namespace
Drupal\layout_builder\FormCode
protected function getSelectedRegion(FormStateInterface $form_state) {
if ($form_state
->hasValue('region')) {
return explode(':', $form_state
->getValue('region'), 2)[1];
}
return $this->region;
}