You are here

public function MandrillTemplateMapForm::exists in Mandrill 8

File

modules/mandrill_template/src/Form/MandrillTemplateMapForm.php, line 173
Contains \Drupal\mandrill_template\Form\MandrillTemplateMapForm.

Class

MandrillTemplateMapForm
Form controller for the MandrillTemplateMap entity edit form.

Namespace

Drupal\mandrill_template\Form

Code

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