You are here

public function BlockEditor::builderList in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 src/Editor/BlockEditor.php \Drupal\forena\Editor\BlockEditor::builderList()

File

src/Editor/BlockEditor.php, line 261

Class

BlockEditor

Namespace

Drupal\forena\Editor

Code

public function builderList() {
  $this
    ->getBuilders();
  $r = $this
    ->dataManager()
    ->repository($this->provider);
  $plugin = get_class($r);
  $list = array();
  foreach ($this->builders as $class => $b) {
    if (array_search($plugin, $b->supportedPlugins) !== FALSE && $b->name && $b->type == $this->block['type']) {
      $list[$class] = $b->name;
    }
  }
  asort($list);
  return $list;
}