You are here

public function VariantPluginDeleteBlockForm::buildForm in Page Manager 8.4

Same name and namespace in other branches
  1. 8 page_manager_ui/src/Form/VariantPluginDeleteBlockForm.php \Drupal\page_manager_ui\Form\VariantPluginDeleteBlockForm::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 ConfirmFormBase::buildForm

File

page_manager_ui/src/Form/VariantPluginDeleteBlockForm.php, line 78

Class

VariantPluginDeleteBlockForm
Provides a form for deleting an access condition.

Namespace

Drupal\page_manager_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $block_display = NULL, $block_id = NULL) {
  $this->plugin = $this
    ->getTempstore()
    ->get($block_display)['plugin'];
  $this->block = $this->plugin
    ->getBlock($block_id);
  $form['block_display'] = [
    '#type' => 'value',
    '#value' => $block_display,
  ];
  return parent::buildForm($form, $form_state);
}