You are here

public function FrxSVGGraph::configValidate in Forena Reports 7.5

Default configuration validator. Simply validates header and footer attributes.

Parameters

unknown $config:

Return value

multitype:Ambigous <The, string, A, Optional>

Overrides RendererBase::configValidate

File

src/Renderer/FrxSVGGraph.php, line 598
FrxSVGGraph php SVG Graph generator

Class

FrxSVGGraph

Namespace

Drupal\forena\Renderer

Code

public function configValidate(&$config) {
  $type = $config['style'];
  $base_type = $config['base_type'];
  $graph_options = $this
    ->graphOptions();
  if (!array_key_exists($type, $graph_options['styles'][$base_type])) {
    $styles = array_keys($graph_options['styles'][$base_type]);
    $config['type'] = $config['style'] = array_shift($styles);
  }
  $config['type'] = $config['style'];
}