You are here

function skinr_info_templates_to_form_options in Skinr 6

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_info_templates_to_form_options()
skinr_form_alter in ./skinr.module
Implementation of hook_form_alter().

File

./skinr.module, line 647

Code

function skinr_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;
}