You are here

public function AppService::getFormatterPlugins in Forena Reports 8

Returns a list of formatters that provide format methods.

Return value

array

1 method overrides AppService::getFormatterPlugins()
TestingAppService::getFormatterPlugins in tests/src/Unit/Mock/TestingAppService.php
Return the forena provided formatter plugin.

File

src/AppService.php, line 104

Class

AppService

Namespace

Drupal\forena

Code

public function getFormatterPlugins() {
  $formatters = [];
  $pm = \Drupal::service('frxplugin.manager.formatter');
  $plugins = $pm
    ->getDefinitions();
  foreach ($plugins as $formatter) {

    // Find out if plugin is defined.
    $class = $formatter['class'];
    $formatters[] = $class;
  }
  return $formatters;
}