You are here

public function ProtectionRuleEditForm::form in User protect 8

Gets the actual form array to be built.

Overrides ProtectionRuleFormBase::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

src/Form/ProtectionRuleEditForm.php, line 15

Class

ProtectionRuleEditForm
Provides a form controller for editing a protection rule.

Namespace

Drupal\userprotect\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form['#title'] = $this
    ->t('Edit protection rule %name', [
    '%name' => $this->entity
      ->label(),
  ]);
  $form = parent::form($form, $form_state);
  return $form;
}