You are here

public function Report::sort in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 src/Report.php \Drupal\forena\Report::sort()

Sort the current data context if it is an array.

Parameters

$teng Token replacement engine to use for sort:

unknown $sort:

string $compare_type:

File

src/Report.php, line 752
Basic report provider. Controls the rendering of the report.

Class

Report

Namespace

Drupal\forena

Code

public function sort(&$data, $sort, $compare_type = '') {
  $this
    ->setSort($sort, $compare_type);
  if (is_array($data)) {
    uasort($data, array(
      $this,
      'compareFunction',
    ));
  }
}