You are here

public function CkeditorTemplateForm::exist in Ckeditor templates user interface 8

Helper function to check if ckeditor_template configuration entity exists.

File

src/Form/CkeditorTemplateForm.php, line 165

Class

CkeditorTemplateForm
Implement config form for Ckeditor template.

Namespace

Drupal\ckeditor_templates_ui\Form

Code

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