You are here

public function PoolForm::exist in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 8 src/Form/PoolForm.php \Drupal\cms_content_sync\Form\PoolForm::exist()
  2. 2.0.x src/Form/PoolForm.php \Drupal\cms_content_sync\Form\PoolForm::exist()

Helper function to check whether an Pool configuration entity exists.

Parameters

mixed $id:

File

src/Form/PoolForm.php, line 321

Class

PoolForm
Form handler for the Pool add and edit forms.

Namespace

Drupal\cms_content_sync\Form

Code

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