You are here

public function FormComponentAddForm::nameExists in Flexiform 8

Check whether the namespace already exists.

File

src/Form/FormComponentAddForm.php, line 217

Class

FormComponentAddForm
Provides a form for adding new form components.

Namespace

Drupal\flexiform\Form

Code

public function nameExists($name, $element, FormStateInterface $form_state) {
  return $this->formDisplay
    ->getComponent($name) !== NULL;
}