protected function SkinsEditForm::optionsToFormOptions in Skinr 8.2
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
string[] A Form API compatible array of options.
1 call to SkinsEditForm::optionsToFormOptions()
- SkinsEditForm::buildForm in skinr_ui/
src/ Form/ SkinsEditForm.php - Form constructor.
File
- skinr_ui/
src/ Form/ SkinsEditForm.php, line 427 - Contains Drupal\skinr_ui\Form\SkinsEditForm.
Class
Namespace
Drupal\skinr_ui\FormCode
protected function optionsToFormOptions($options) {
$form_options = array();
foreach ($options as $option_name => $option) {
$form_options[$option_name] = $option['title'];
}
return $form_options;
}