public function ResponseHeaderForm::exist in HTTP Response Headers 2.0.x
Same name and namespace in other branches
- 8.2 src/Form/ResponseHeaderForm.php \Drupal\http_response_headers\Form\ResponseHeaderForm::exist()
Helper function to check whether an Response Header configuration entity exists.
File
- src/
Form/ ResponseHeaderForm.php, line 118
Class
- ResponseHeaderForm
- Form handler for the Response Header add and edit forms.
Namespace
Drupal\http_response_headers\FormCode
public function exist($id) {
$entity = $this->entityQuery
->get('response_header')
->condition('id', $id)
->execute();
return (bool) $entity;
}