You are here

protected function DashboardForm::buildUserMetric in Opigno statistics 8

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

Builds one block for the user metrics.

Parameters

string $label: Label.

string $value: Value.

string $help_text: Help text.

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 223

Class

DashboardForm
Implements the statistics dashboard.

Namespace

Drupal\opigno_statistics\Form

Code

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