You are here

function quicktabs_export in Quick Tabs 7.3

Exports the specified Quicktabs instance with translatable strings.

1 string reference to 'quicktabs_export'
quicktabs_schema in ./quicktabs.install
Implements hook_schema().

File

./quicktabs.module, line 345

Code

function quicktabs_export($qt, $indent = '') {
  $output = ctools_export_object('quicktabs', $qt, $indent);
  $translatables = array();
  if (!empty($qt->title)) {
    $translatables[] = $qt->title;
  }
  foreach ($qt->tabs as $tab) {
    $translatables[] = $tab['title'];
  }
  $translatables = array_filter(array_unique($translatables));
  if (!empty($translatables)) {
    $output .= "\n";
    $output .= "{$indent}// Translatables\n";
    $output .= "{$indent}// Included for use with string extractors like potx.\n";
    sort($translatables);
    foreach ($translatables as $string) {
      $output .= "{$indent}t(" . ctools_var_export($string) . ");\n";
    }
    $output .= "\n";
  }
  return $output;
}