public function FlagAddPageForm::exists in Flag 8.4
Determines if the flag already exists.
Parameters
string $id: The flag ID.
Return value
bool TRUE if the flag exists, FALSE otherwise.
File
- src/
Form/ FlagAddPageForm.php, line 113
Class
- FlagAddPageForm
- Provides the flag add page.
Namespace
Drupal\flag\FormCode
public function exists($id) {
// @todo: Make this injected like ActionFormBase::exists().
return $this->entityTypeManager
->getStorage('flag')
->load($id);
}