You are here

function _commerce_billy_mail_get_pdf_theme_items in Commerce Billy Mail 7

2 calls to _commerce_billy_mail_get_pdf_theme_items()
commerce_billy_mail_settings_form in ./commerce_billy_mail.admin.inc
commerce_billy_mail_settings_form.admin settings form.
commerce_billy_mail_theme_registry_alter in ./commerce_billy_mail.module
Implements hook_theme_registry_alter.

File

./commerce_billy_mail.module, line 350

Code

function _commerce_billy_mail_get_pdf_theme_items() {
  if (_commerce_billy_mail_is_theme_registry_workaround_available()) {
    module_load_include('module', 'commerce_billy_pdf');
    if (function_exists('commerce_billy_pdf_theme')) {
      $theme_items = commerce_billy_pdf_theme();
      $theme_item_keys = array_keys($theme_items);
      $result = array();
      if (!empty($theme_item_keys)) {
        foreach ($theme_item_keys as $theme_item_key) {

          // Make key and value the same.
          $result[$theme_item_key] = $theme_item_key;
        }
      }
      return $result;
    }
  }
  return array();
}