You are here

public function AbrconfigForm::exist in Access by Reference 8.2

Helper function to check whether an Example configuration entity exists.

File

src/Form/AbrconfigForm.php, line 284

Class

AbrconfigForm
Form handler for the Example add and edit forms.

Namespace

Drupal\access_by_ref\Form

Code

public function exist($id) {
  $entity = $this->entityTypeManager
    ->getStorage('abrconfig')
    ->getQuery()
    ->condition('id', $id)
    ->execute();
  return (bool) $entity;
}