You are here

public function FormEntityBaseForm::namespaceExists in Flexiform 8

Check whether the namespace already exists.

File

src/Form/FormEntityBaseForm.php, line 245

Class

FormEntityBaseForm
Provides a base class for entity forms.

Namespace

Drupal\flexiform\Form

Code

public function namespaceExists($namespace, $element, FormStateInterface $form_state) {
  $entities = $this->formDisplay
    ->getFormEntityConfig();
  return !empty($entities[$namespace]);
}