function _spaces_dashboard_views_handler_field_nodelink in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_dashboard/spaces_dashboard.module \_spaces_dashboard_views_handler_field_nodelink()
Custom views field handler for adding a class to distinguish between public/private group nodes. Requires a field for og_private in the view.
2 string references to '_spaces_dashboard_views_handler_field_nodelink'
- _spaces_dashboard_views_group_directory in spaces_dashboard/
spaces_dashboard.module - _spaces_dashboard_views_group_my in spaces_dashboard/
spaces_dashboard.module
File
- spaces_dashboard/
spaces_dashboard.module, line 615
Code
function _spaces_dashboard_views_handler_field_nodelink($fieldinfo, $fielddata, $value, $data) {
if ($fielddata['options'] == 'nolink') {
return check_plain($value);
}
return $data->og_private ? l($value, "node/{$data->nid}", array(
'class' => 'private',
)) : l($value, "node/{$data->nid}", array(
'class' => 'public',
));
}