function biblio_type_delete in Bibliography Module 7.3
Delete a biblio bundle.
Parameters
string $type: The value of a biblio type.
2 calls to biblio_type_delete()
- biblio_ui_delete_bundle_submit in modules/
biblio_ui/ biblio_ui.module - Delete the biblio bundle.
- MigrateDestinationBiblioType::rollback in includes/
migrate/ plugins/ destinations/ biblio_type.inc - Delete a biblio type.
File
- ./
biblio.module, line 422 - Maintains bibliographic lists.
Code
function biblio_type_delete($type) {
$query = new entityFieldQuery();
$number = $query
->entityCondition('entity_type', 'biblio')
->propertyCondition('type', $type)
->count()
->execute();
if ($number) {
throw new Exception(t("You cannot delete the bundle @type because there are biblio entries of this bundle."));
}
db_delete('biblio_type')
->condition('type', $type)
->execute();
}