You are here

public function GoogleApiServiceClientForm::exist in Google API PHP Client 8.3

Same name and namespace in other branches
  1. 8.4 src/Form/GoogleApiServiceClientForm.php \Drupal\google_api_client\Form\GoogleApiServiceClientForm::exist()

Helper function to check whether an Example configuration entity exists.

File

src/Form/GoogleApiServiceClientForm.php, line 128

Class

GoogleApiServiceClientForm
Form controller for the google_api_service_client entity edit forms.

Namespace

Drupal\google_api_client\Form

Code

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