public function generateIndexChoiceSelector($edit_table)
{
$html_options = '<select name="index[Index_choice]"' . ' id="select_index_choice" ' . ($edit_table ? 'disabled="disabled"' : '') . '>';
foreach (Index::getIndexChoices() as $each_index_choice) {
if ($each_index_choice === 'PRIMARY' && $this->_choice !== 'PRIMARY' && Index::getPrimary($this->_table, $this->_schema)) {
// skip PRIMARY if there is already one in the table
continue;
}
$html_options .= '<option value="' . $each_index_choice . '"' . ($this->_choice == $each_index_choice ? ' selected="selected"' : '') . '>' . $each_index_choice . '</option>' . "\n";
}
$html_options .= '</select>';
return $html_options;
}