function _viewfield_get_option_label in Viewfield 7.3
1 call to _viewfield_get_option_label()
- _viewfield_potential_references in ./
viewfield.module - Returns a select options list of views displays of enabled and allowed views.
File
- ./
viewfield.module, line 474 - Defines a field type to display a view.
Code
function _viewfield_get_option_label($view, $view_label, $display, $display_label) {
$options_label = '';
switch ($view_label) {
case 'human':
$options_label = $view->human_name . ' - ';
break;
case 'machine':
$options_label = $view->name . ' - ';
break;
case 'human_machine':
$options_label = $view->human_name . ' (' . $view->name . ') - ';
break;
}
switch ($display_label) {
case 'human':
$options_label .= $display->display_title;
break;
case 'machine':
$options_label .= $display->id;
break;
case 'human_machine':
$options_label .= $display->display_title . ' (' . $display->id . ')';
break;
}
return $options_label;
}