You are here

public function RuleComponentForm::form in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Form/RuleComponentForm.php \Drupal\rng\Form\RuleComponentForm::form()
  2. 3.x src/Form/RuleComponentForm.php \Drupal\rng\Form\RuleComponentForm::form()

Gets the actual form array to be built.

Overrides ContentEntityForm::form

See also

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

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

File

src/Form/RuleComponentForm.php, line 88

Class

RuleComponentForm
Form controller for rng rule components.

Namespace

Drupal\rng\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $action = $this->entity;
  if (!$action
    ->isNew()) {
    $form['#title'] = $this
      ->t('Edit @type', array(
      '@type' => $action
        ->getType(),
    ));
  }
  $form = $this->plugin
    ->buildConfigurationForm($form, $form_state);
  return parent::form($form, $form_state, $action);
}