You are here

public function PanelsDeleteBlockForm::buildForm in Panels 8.3

Same name and namespace in other branches
  1. 8.4 src/Form/PanelsDeleteBlockForm.php \Drupal\panels\Form\PanelsDeleteBlockForm::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

src/Form/PanelsDeleteBlockForm.php, line 107

Class

PanelsDeleteBlockForm
Provides a form for deleting an access condition.

Namespace

Drupal\panels\Form

Code

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