public function TocTypeForm::exists in TOC API 8
Determines if the TOC type already exists.
Parameters
string $id: The ID.
Return value
bool TRUE if the TOC type exists, FALSE otherwise.
File
- src/
TocTypeForm.php, line 384
Class
- TocTypeForm
- Base form for TOC type add and edit forms.
Namespace
Drupal\toc_apiCode
public function exists($id) {
return (bool) $this->entityTypeManager
->get('toc_type')
->condition('id', $id)
->execute();
}