public function UrlRedirectForm::exist in Url Redirect 8.2
Same name and namespace in other branches
- 8 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 230
Class
- UrlRedirectForm
- Form handler for the Example add and edit forms.
Namespace
Drupal\url_redirect\FormCode
public function exist($id) {
$storage = $this->entityTypeManagerInterface
->getStorage('url_redirect');
$entity = $storage
->getQuery()
->condition('id', $id)
->execute();
return (bool) $entity;
}