function theme_signup_settings_view_label in Signup 7
Same name and namespace in other branches
- 6.2 includes/admin.settings.inc \theme_signup_settings_view_label()
- 6 includes/admin.settings.inc \theme_signup_settings_view_label()
Generates the appropriate selector label for a given view.
Parameters
views_view $view: An object containing data about the view to generate a label for. Contains at least a name (string), description (string), page (bool), and block (bool) fields.
Return value
string The plain text (no HTML allowed) to include as the label for this view in the drop-down selector for which view to embed on the site-wide signup settings page.
See also
1 theme call to theme_signup_settings_view_label()
- signup_settings_form in includes/
admin.settings.inc - Form builder for the settings page under admin/config/people/signup
File
- includes/
admin.settings.inc, line 260 - Code required for the signup settings page (admin/config/people/signup).
Code
function theme_signup_settings_view_label($variables) {
$view = $variables['view'];
$display_id = $variables['display_id'];
$display_title = check_plain($view->display[$display_id]->display_title);
$label = $view->name;
$label .= ' [' . $display_title . ']: ';
$label .= $view->description;
if (drupal_strlen($label) > 90) {
$label = drupal_substr($label, 0, 90) . '...';
}
return $label;
}