You are here

function _invoice_get_templates in Invoice 6

Same name and namespace in other branches
  1. 7 invoice_helpers.inc \_invoice_get_templates()

Helper function to get the available template names

4 calls to _invoice_get_templates()
invoice_form in ./invoice_form.inc
Implementatin of node_form()
invoice_settings_form in ./invoice_form.inc
Invoice settings form
invoice_settings_form_submit in ./invoice.module
Submit function for the settings form
_invoice_get_variable in ./invoice_helpers.inc
Helper function to get template variables

File

./invoice_helpers.inc, line 442
Invoice module

Code

function _invoice_get_templates() {
  $a_templates = array(
    'default',
  );
  $files = file_scan_directory(dirname(__FILE__) . '/templates', '.inc');
  foreach ($files as $file) {
    if (!empty($file->name) && $file->name != 'default') {
      $a_templates[] = check_plain($file->name);
    }
  }
  return $a_templates;
}