public function CopyRemoteFlow::exists in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Form/CopyRemoteFlow.php \Drupal\cms_content_sync\Form\CopyRemoteFlow::exists()
- 2.0.x src/Form/CopyRemoteFlow.php \Drupal\cms_content_sync\Form\CopyRemoteFlow::exists()
Check if the entity exists.
A helper function to check whether an Flow configuration entity exists.
Parameters
int $id: An ID of sync
Return value
bool Checking on exist an entity
File
- src/
Form/ CopyRemoteFlow.php, line 367
Class
- CopyRemoteFlow
- Form handler for the Pool add and edit forms.
Namespace
Drupal\cms_content_sync\FormCode
public function exists($id) {
$entity = $this->entityTypeManager
->getStorage('cms_content_sync_flow')
->getQuery()
->condition('id', $id)
->execute();
return (bool) $entity;
}