You are here

public function ResponseHeaderForm::exist in HTTP Response Headers 8.2

Same name and namespace in other branches
  1. 2.0.x 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\Form

Code

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