function monitoring_sensor_action_title in Monitoring 7
Same name and namespace in other branches
- 8 monitoring.module \monitoring_sensor_action_title()
Sensor pages title callback.
Parameters
string $action: View/page action.
\Drupal\monitoring\Sensor\SensorInfo $sensor_info: Sensor info.
Return value
string Title.
1 call to monitoring_sensor_action_title()
- monitoring_views_pre_render in ./
monitoring.module - Implements hook_views_pre_render().
1 string reference to 'monitoring_sensor_action_title'
- monitoring_menu in ./
monitoring.module - Implements hook_menu().
File
- ./
monitoring.module, line 284 - Monitoring bootstrap file.
Code
function monitoring_sensor_action_title($action, SensorInfo $sensor_info) {
$placeholders = array(
'@category' => $sensor_info
->getCategory(),
'@label' => $sensor_info
->getLabel(),
);
switch ($action) {
case 'settings':
return t('@label settings (@category)', $placeholders);
case 'details':
case 'log':
return t('@label (@category)', $placeholders);
}
return '';
}