You are here

public function UrlRedirectForm::exist in Url Redirect 8

Same name and namespace in other branches
  1. 8.2 src/Form/UrlRedirectForm.php \Drupal\url_redirect\Form\UrlRedirectForm::exist()

Helper function to check whether an UrlRedirect configuration entity exists.

File

src/Form/UrlRedirectForm.php, line 221

Class

UrlRedirectForm
Form handler for the Example add and edit forms.

Namespace

Drupal\url_redirect\Form

Code

public function exist($id) {
  $entity = $this->entityQuery
    ->get('url_redirect')
    ->condition('id', $id)
    ->execute();
  return (bool) $entity;
}