You are here

public function ReportEditor::templateOptions in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::templateOptions()

Generate the list of possible templates.

2 calls to ReportEditor::templateOptions()
ReportEditor::blockLinks in src/Editor/ReportEditor.php
ReportEditor::scrapeBlockConfig in src/Editor/ReportEditor.php
Scrape Data block configuration This tries to introspect the frx:block configuration based on the child nodes in the report by calling the getConfig method on the block.

File

src/Editor/ReportEditor.php, line 1231
ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

ReportEditor

Namespace

Drupal\forena\Editor

Code

public function templateOptions() {
  $controls = Frx::Controls();
  $templates = array();
  foreach ($controls as $control) {
    if (method_exists($control, 'generate') && isset($control->templateName)) {
      $templates[get_class($control)] = $control->templateName;
    }
  }
  asort($templates);
  return $templates;
}