protected function getBlockTypes(array $fieldDefinition, FieldModel $field)
{
$blockTypes = $this->getSuperTableService()->getBlockTypesByFieldId($field->id);
$index = 0;
foreach ($fieldDefinition['blockTypes'] as $blockTypeDef) {
$blockType = array_key_exists($index, $blockTypes) ? $blockTypes[$index] : new SuperTable_BlockTypeModel();
$blockType->fieldId = $field->id;
$this->populateBlockType($blockType, $blockTypeDef);
$blockTypes[$index] = $blockType;
++$index;
}
return $blockTypes;
}