public function deleteField(FieldModel $neoField)
{
$transaction = $this->beginTransaction();
try {
// Delete the block types
$blockTypes = $this->getBlockTypesByFieldId($neoField->id);
foreach ($blockTypes as $blockType) {
$this->deleteBlockType($blockType);
}
$this->commitTransaction($transaction);
} catch (\Exception $e) {
$this->rollbackTransaction($transaction);
throw $e;
}
}