public getMetadata ( string $name ) : mixed | false | ||
$name | string | The metadata name. |
return | mixed | false | The metadata value or `false` if it cannot be found. |
public function getMetadata($name)
{
if (!isset($this->metadata[$name])) {
return false;
}
return $this->metadata[$name];
}
public function getMetricTotalValue(DataTable $currentReport, $metric) { $totals = $currentReport->getMetadata('totals'); if (!empty($totals[$metric])) { $totalValue = (int) $totals[$metric]; } else { $totalValue = 0; } return $totalValue; }