function units_ui_unit_title in Units of Measurement 7
Same name and namespace in other branches
- 7.2 units_ui.module \units_ui_unit_title()
Menu title callback for UI of Units Unit entity.
Parameters
string $measure: Bundle string of units unit entity type
Return value
string Title of menu path
1 string reference to 'units_ui_unit_title'
- UnitsUnitUIController::hook_menu in includes/
UnitsUnitUIController.class.inc - Provides definitions for implementing hook_menu().
File
- ./
units_ui.module, line 169 - Provide UI for managing available units and conversions between them.
Code
function units_ui_unit_title($measure) {
$unit_info = entity_get_info('units_unit');
$entity_label = isset($unit_info['plural label']) ? $unit_info['plural label'] : $unit_info['label'] . 's';
return t('@entity_label of @entity_bundle_label', array(
'@entity_label' => $entity_label,
'@entity_bundle_label' => entity_label('units_measure', $measure),
));
}