public function saveStructure(StructureModel $structure, NeoFieldType $fieldType)
{
$owner = $fieldType->element;
$field = $fieldType->model;
$locale = $this->_getFieldLocale($fieldType);
$blockStructure = new Neo_BlockStructureRecord();
$transaction = $this->beginTransaction();
try {
$this->deleteStructure($fieldType);
craft()->structures->saveStructure($structure);
$blockStructure->structureId = $structure->id;
$blockStructure->ownerId = $owner->id;
$blockStructure->ownerLocale = $locale;
$blockStructure->fieldId = $field->id;
$blockStructure->save(false);
$this->commitTransaction($transaction);
} catch (\Exception $e) {
$this->rollbackTransaction($transaction);
throw $e;
}
return true;
}