You are here

public function ClientForm::exists in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x src/Form/ClientForm.php \Drupal\oauth2_server\Form\ClientForm::exists()

Determines if the client entity already exists.

Parameters

string $client_id: The client ID.

Return value

bool TRUE if the client exists, FALSE otherwise.

File

src/Form/ClientForm.php, line 218

Class

ClientForm
Class Client Form.

Namespace

Drupal\oauth2_server\Form

Code

public function exists($client_id) {
  $entity = $this->entityQuery
    ->condition('client_id', $client_id)
    ->execute();
  return (bool) $entity;
}