You are here

public function IdpForm::exist in SAML Service Provider 3.x

Same name and namespace in other branches
  1. 8.3 src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::exist()
  2. 8.2 src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::exist()
  3. 4.x src/Form/IdpForm.php \Drupal\saml_sp\Form\IdpForm::exist()

Tests whether the IdP exists.

File

src/Form/IdpForm.php, line 315

Class

IdpForm
Provides the form to configure the IdP.

Namespace

Drupal\saml_sp\Form

Code

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