public function ContentHubFilterForm::exist in Acquia Content Hub 8
Checks whether this entity exists or not.
Parameters
int $id: The id on the entity.
Return value
bool If the entity exists or not.
File
- acquia_contenthub_subscriber/
src/ Form/ ContentHubFilterForm.php, line 197
Class
- ContentHubFilterForm
- Prepares the form for input Content Hub Filters.
Namespace
Drupal\acquia_contenthub_subscriber\FormCode
public function exist($id) {
$query = $this->entityTypeManager
->getStorage('contenthub_filter')
->getQuery();
$filter_ids = $query
->condition('id', $id)
->execute();
return (bool) $filter_ids;
}