public function BlockCategoryForm::exist in Layout Builder Browser 8
Check whether an layout_builder_browser configuration entity exists.
The id of the block to check.
Return value
bool True if block exists.
File
- src/
Form/ BlockCategoryForm.php, line 94
Class
- BlockCategoryForm
- Form handler for the block categories add and edit forms.
Namespace
Drupal\layout_builder_browser\FormCode
public function exist($id) {
$entity = $this->entityTypeManager
->getStorage('layout_builder_browser_blockcat')
->getQuery()
->condition('id', $id)
->execute();
return (bool) $entity;
}