function uc_extra_fields_pane_option_list in Extra Fields Checkout Pane 7
Returns a list of options from a select field.
This function is used as a callback by Entity API's 'options list'.
Parameters
string $field_name: The db_name of the field to get options for.
Return value
array A list of options.
1 string reference to 'uc_extra_fields_pane_option_list'
File
- ./
uc_extra_fields_pane.module, line 330 - Module: uc_extra_fields_pane.module
Code
function uc_extra_fields_pane_option_list($field_name) {
$field = UCXF_FieldList::getFieldByName($field_name);
switch ($field->value_type) {
case UCXF_Field::UCXF_WIDGET_TYPE_SELECT:
case UCXF_Field::UCXF_WIDGET_TYPE_PHP_SELECT:
return $field
->generate_value();
}
return array();
}