private function ContributorCategoryDeleteForm::checkInReference in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_entity/src/Form/ContributorCategoryDeleteForm.php \Drupal\bibcite_entity\Form\ContributorCategoryDeleteForm::checkInReference()
Find if author of this category is in reference entity.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 call to ContributorCategoryDeleteForm::checkInReference()
- ContributorCategoryDeleteForm::init in modules/
bibcite_entity/ src/ Form/ ContributorCategoryDeleteForm.php - Initialize the form state and the entity before the first form build.
File
- modules/
bibcite_entity/ src/ Form/ ContributorCategoryDeleteForm.php, line 27
Class
- ContributorCategoryDeleteForm
- Builds the form to delete Contributor category entities.
Namespace
Drupal\bibcite_entity\FormCode
private function checkInReference() {
$storage = $this->entityTypeManager
->getStorage('bibcite_reference');
$query = $storage
->getQuery();
return !empty($query
->condition('author.category', $this->entity
->id())
->range(0, 1)
->execute());
}