public function MegaMenuAdd::exist in The Better Mega Menu 8
Same name and namespace in other branches
- 2.x src/Form/MegaMenuAdd.php \Drupal\tb_megamenu\Form\MegaMenuAdd::exist()
Helper function to check whether an Example configuration entity exists.
File
- src/
Form/ MegaMenuAdd.php, line 159
Class
- MegaMenuAdd
- Form handler for adding MegaMenuConfig entities.
Namespace
Drupal\tb_megamenu\FormCode
public function exist($id) {
$entity = $this->entityQuery
->get('example')
->condition('id', $id)
->execute();
return (bool) $entity;
}