You are here

public function FrxSVGGraph::configValidate in Forena Reports 7.4

Default configuration validator. Simply validates header and footer attributes.

Parameters

unknown $config:

Return value

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

Overrides FrxRenderer::configValidate

File

renderers/FrxSVGGraph.inc, line 601

Class

FrxSVGGraph

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'];
}