You are here

public function ConditionDeleteForm::buildForm in Block Visibility Groups 8

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/ConditionDeleteForm.php, line 62

Class

ConditionDeleteForm
Provides a form for deleting an condition.

Namespace

Drupal\block_visibility_groups\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, BlockVisibilityGroup $block_visibility_group = NULL, $condition_id = NULL, $redirect = 'edit') {
  $this->block_visibility_group = $block_visibility_group;
  $this
    ->setRedirectValue($form, $redirect);
  $this->condition = $block_visibility_group
    ->getCondition($condition_id);
  return parent::buildForm($form, $form_state);
}