You are here

public function Report::sort in Forena Reports 8

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

Sort the current data context if it is an array.

Parameters

string $sort:

string $compare_type:

File

src/Report.php, line 707
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',
    ));
  }
}