function monitoring_sensor_action_title in Monitoring 8
Same name and namespace in other branches
- 7 monitoring.module \monitoring_sensor_action_title()
Sensor pages title callback.
Parameters
string $action: View/page action.
\Drupal\monitoring\Entity\SensorConfig $sensor_config: Sensor config.
Return value
string Title.
File
- ./
monitoring.module, line 222 - Monitoring bootstrap file.
Code
function monitoring_sensor_action_title($action, SensorConfig $sensor_config) {
$placeholders = array(
'@category' => $sensor_config
->getCategory(),
'@label' => $sensor_config
->getLabel(),
);
switch ($action) {
case 'log':
return t('@label (@category)', $placeholders);
}
return '';
}