You are here

public static function Frx::documentTypes in Forena Reports 7.5

Same name and namespace in other branches
  1. 7.3 Frx.inc \Frx::documentTypes()
  2. 7.4 Frx.inc \Frx::documentTypes()

Returns list of document types supported.

Parameters

unknown_type $all:

4 calls to Frx::documentTypes()
forena_doc_formats_settings in ./forena.admin.inc
Menu::__construct in src/Menu.php
ReportEditor::documentLinks in src/Editor/ReportEditor.php
ReportEditor::getDocgen in src/Editor/ReportEditor.php
Gets the array of selected document types or default if they are present.

File

./Frx.inc, line 154
Frx.incL General Forena Reporting Class

Class

Frx

Code

public static function documentTypes($all = FALSE) {
  static $supported_doctypes = '';
  if (!$supported_doctypes || $all) {
    $doc_types = module_invoke_all('forena_document_types');
    if (!$all) {
      unset($doc_types['web']);
    }
    $supported_doctypes = array();
    foreach ($doc_types as $type => $doc) {
      $supported_doctypes[$type] = $type;
    }
  }
  return $supported_doctypes;
}