You are here

function monitoring_value_label_callback_bool in Monitoring 8

Same name and namespace in other branches
  1. 7 monitoring.module \monitoring_value_label_callback_bool()

Formatter for boolean value (TRUE, FALSE).

Parameters

\Drupal\monitoring\Result\SensorResultInterface $result: Result object for which to get the formatted value.

Return value

string TRUE or FALSE strings.

1 string reference to 'monitoring_value_label_callback_bool'
monitoring_value_types in ./monitoring.module
Gets available value types definitions.

File

./monitoring.module, line 445
Monitoring bootstrap file.

Code

function monitoring_value_label_callback_bool(SensorResultInterface $result) {
  return $result
    ->getValue() ? 'TRUE' : 'FALSE';
}