public function FlowForm::exists in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Form/FlowForm.php \Drupal\cms_content_sync\Form\FlowForm::exists()
- 2.0.x src/Form/FlowForm.php \Drupal\cms_content_sync\Form\FlowForm::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
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
Form/ FlowForm.php, line 719
Class
- FlowForm
- Form handler for the Flow 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;
}