You are here

function skinr_ui_info_templates_to_form_options in Skinr 6.2

Helper function to convert an array of template filenames, as specified in the info file, into an array usable by form api.

1 call to skinr_ui_info_templates_to_form_options()
skinr_ui_form_alter in ./skinr_ui.module
Implementation of hook_form_alter().

File

./skinr_ui.module, line 780

Code

function skinr_ui_info_templates_to_form_options($templates) {
  $form_options = array();
  foreach ($templates as $template) {

    // If it exists, strip .tpl.php from template.
    $template = str_replace('.tpl.php', '', $template);
    $form_options[$template] = $template . '.tpl.php';
  }
  return $form_options;
}