asArray(); $results = array(); $table = array( '' . implode( '', array( '', $this->view->translate('Label'), $this->view->translate('Value'), $this->view->translate('Min'), $this->view->translate('Max'), $this->view->translate('Warning'), $this->view->translate('Critical') ) ) . '' ); foreach ($pieChartData as $perfdata) { if ($compact && $perfdata->isVisualizable()) { $results[] = $perfdata->asInlinePie($color)->render(); } else { $row = ''; $row .= ''; if ($perfdata->isVisualizable()) { $row .= $perfdata->asInlinePie($color)->render() . ' '; } $row .= ''; if (! $compact) { foreach ($perfdata->toArray() as $value) { if ($value === '') { $value = '-'; } $row .= '' . (string) $value . ''; } } $row .= ''; $table[] = $row; } } if ($limit > 0) { $count = max(count($table), count($results)); $table = array_slice($table, 0, $limit); $results = array_slice($results, 0, $limit); if ($count > $limit) { $mess = sprintf($this->view->translate('%d more ...'), $count - $limit); $results[] = '...'; } } if ($compact) { return join('', $results); } else { $pieCharts = empty($table) ? '' : '' . implode("\n", $table) . '
'; return $pieCharts; } } }