You are here

public function FrxCrosstab::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/FrxCrosstab.inc, line 292

Class

FrxCrosstab

Code

public function configValidate(&$config) {
  $errors = $this
    ->validateTextFormats($config, array(
    'header',
    'footer',
  ));
  $dims = 0;
  if (@$config['crosstab_columns']) {
    foreach ($config['crosstab_columns'] as $col) {
      if (@$col['type'] == 'value') {
        $dims++;
      }
    }
  }
  if ($dims > 1) {
    $errors[] = t('Too many value columns.  Please select only one');
  }
  return $errors;
}