You are here

protected function ConditionRedirectTrait::setRedirectValue in Block Visibility Groups 8

Set value for redirect.

Parameters

array $form: The form array.

string $redirect: The redirect option: layout, edit, or null.

2 calls to ConditionRedirectTrait::setRedirectValue()
ConditionDeleteForm::buildForm in src/Form/ConditionDeleteForm.php
Form constructor.
ConditionFormBase::buildForm in src/Form/ConditionFormBase.php
Form constructor.

File

src/ConditionRedirectTrait.php, line 47

Class

ConditionRedirectTrait
Provides functionality to redirect conditions form to correct location.

Namespace

Drupal\block_visibility_groups

Code

protected function setRedirectValue(array &$form, $redirect) {
  $form['bvg_redirect'] = [
    '#type' => 'value',
    '#value' => $redirect,
  ];
}