fetchSubtable() public method

Fetches a subtable for the report represented by this instance.
public fetchSubtable ( integer $idSubtable, array $paramOverride = [] ) : DataTable
$idSubtable integer The subtable ID.
$paramOverride array Query parameter overrides.
return Piwik\DataTable
示例#1
0
 private function loadSubtable(DataTable $table, Row $row)
 {
     $idSubtable = $row->getIdSubDataTable();
     if ($idSubtable === null) {
         return null;
     }
     $subtable = $row->getSubtable();
     if (!$subtable) {
         $subtable = $this->thisReport->fetchSubtable($idSubtable, $this->getRequestParamOverride($table));
     }
     if (!$subtable) {
         // sanity check
         throw new Exception("Unexpected error: could not load subtable '{$idSubtable}'.");
     }
     return $subtable;
 }