protected function SkinEditForm::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 SkinEditForm::optionsToFormOptions()
- SkinEditForm::form in skinr_ui/
src/ Form/ SkinEditForm.php - Gets the actual form array to be built.
File
- skinr_ui/
src/ Form/ SkinEditForm.php, line 311 - Contains Drupal\skinr_ui\Form\SkinEditForm.
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;
}