You are here

protected function StatisticsPageTrait::buildValue in Opigno statistics 8

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

Builds value for the training progress block.

Parameters

string $label: Value label.

string $value: Value.

string $help_text: Help text.

Return value

array Render array.

1 call to StatisticsPageTrait::buildValue()
StatisticsPageTrait::buildValueWithIndicator in src/StatisticsPageTrait.php
Builds value with a indicator for the training progress block.

File

src/StatisticsPageTrait.php, line 58

Class

StatisticsPageTrait
Common helper methods for a statistics pages.

Namespace

Drupal\opigno_statistics

Code

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