public function PanelsAddBlockForm::buildForm in Panels 8.3
Same name and namespace in other branches
- 8.4 src/Form/PanelsAddBlockForm.php \Drupal\panels\Form\PanelsAddBlockForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides PanelsBlockConfigureFormBase::buildForm
File
- src/
Form/ PanelsAddBlockForm.php, line 69
Class
- PanelsAddBlockForm
- Provides a form for adding a block plugin to a variant.
Namespace
Drupal\panels\FormCode
public function buildForm(array $form, FormStateInterface $form_state, Request $request = NULL, $tempstore_id = NULL, $machine_name = NULL, $block_id = NULL) {
$form = parent::buildForm($form, $form_state, $tempstore_id, $machine_name, $block_id);
$form['region']['#default_value'] = $request->query
->get('region');
return $form;
}