protected function buildReportMetadata()
{
$report = array('category' => $this->getCategoryId(), 'subcategory' => $this->getSubcategoryId(), 'name' => $this->getName(), 'module' => $this->getModule(), 'action' => $this->getAction());
if (null !== $this->parameters) {
$report['parameters'] = $this->parameters;
}
if (!empty($this->dimension)) {
$report['dimension'] = $this->dimension->getName();
}
if (!empty($this->documentation)) {
$report['documentation'] = $this->documentation;
}
if (true === $this->isSubtableReport) {
$report['isSubtableReport'] = $this->isSubtableReport;
}
$report['metrics'] = $this->getMetrics();
$report['metricsDocumentation'] = $this->getMetricsDocumentation();
$report['processedMetrics'] = $this->getProcessedMetrics();
if (!empty($this->actionToLoadSubTables)) {
$report['actionToLoadSubTables'] = $this->actionToLoadSubTables;
}
if (true === $this->constantRowsCount) {
$report['constantRowsCount'] = $this->constantRowsCount;
}
$relatedReports = $this->getRelatedReports();
if (!empty($relatedReports)) {
$report['relatedReports'] = array();
foreach ($relatedReports as $relatedReport) {
if (!empty($relatedReport)) {
$report['relatedReports'][] = array('name' => $relatedReport->getName(), 'module' => $relatedReport->getModule(), 'action' => $relatedReport->getAction());
}
}
}
$report['order'] = $this->order;
return $report;
}