You are here

function skinr_ui_info_options_to_form_options in Skinr 7.2

Same name and namespace in other branches
  1. 6.2 skinr_ui.module \skinr_ui_info_options_to_form_options()

Helper function to convert an array of options, as specified in the .info file, into an array usable by Form API.

@todo Rename function to be more descriptive.

Parameters

$options: An array containing at least the 'class' and 'label' keys.

Return value

A Form API compatible array of options.

1 call to skinr_ui_info_options_to_form_options()
skinr_ui_form in ./skinr_ui.edit.inc
Form builder for the skins configuration form.

File

./skinr_ui.edit.inc, line 442
Page callbacks for the Skinr UI module related to editing skins.

Code

function skinr_ui_info_options_to_form_options($options) {
  $form_options = array();
  foreach ($options as $option_name => $option) {
    $form_options[$option_name] = t($option['title']);
  }
  return $form_options;
}