You are here

function forena_supported_doctypes in Forena Reports 7

Same name and namespace in other branches
  1. 6 forena.common.inc \forena_supported_doctypes()

Return value

returns an array of supported document format extensions

4 calls to forena_supported_doctypes()
forena_doc_formats_settings in ./forena.admin.inc
forena_layout_form in ./forena.admin.inc
Form function for the edit report form
forena_report in ./forena.module
Load and render a report based on a drupal path. In this function the arglist is used to get the full path to the report.
forena_report_desc in ./forena.common.inc
Get name from argument 1 or alterntaively from a file name

File

./forena.common.inc, line 770
Common functions used throughout the project but loaded in this file to keep the module file lean.

Code

function forena_supported_doctypes() {
  $controls = forena_define_controls();
  $supported_doctypes = array();
  foreach ($controls as $k => $r) {
    $provider = $r;
    if ($provider && method_exists($provider, 'doc_types')) {
      $f = $provider
        ->doc_types();
      $supported_doctypes = array_merge($supported_doctypes, $f);
    }
  }
  $temp = array_keys($supported_doctypes);
  $supported_doctypes = array_combine($temp, $temp);
  return $supported_doctypes;
}