public function PoolForm::exist in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 8 src/Form/PoolForm.php \Drupal\cms_content_sync\Form\PoolForm::exist()
- 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\FormCode
public function exist($id) {
$entity = $this->entityTypeManager
->getStorage('cms_content_sync_pool')
->getQuery()
->condition('id', $id)
->execute();
return (bool) $entity;
}