You are here

protected function DashboardForm::buildUserMetric in Opigno statistics 3.x

Same name and namespace in other branches
  1. 8 src/Form/DashboardForm.php \Drupal\opigno_statistics\Form\DashboardForm::buildUserMetric()

Builds one block for the user metrics.

Parameters

string $label: Label.

string $value: Value.

Return value

array Render array.

1 call to DashboardForm::buildUserMetric()
DashboardForm::buildUserMetrics in src/Form/DashboardForm.php
Builds user metrics.

File

src/Form/DashboardForm.php, line 291

Class

DashboardForm
Implements the statistics dashboard.

Namespace

Drupal\opigno_statistics\Form

Code

protected function buildUserMetric($label, $value) : array {
  return [
    '#theme' => 'opigno_statistics_user_metric',
    '#label' => $label,
    '#value' => $value,
  ];
}