function opigno_learning_path_preprocess_views_view_field in Opigno Learning path 8
Same name and namespace in other branches
- 3.x opigno_learning_path.module \opigno_learning_path_preprocess_views_view_field()
Implements hook_views_view_field().
File
- ./
opigno_learning_path.module, line 3984 - Contains opigno_learning_path.module.
Code
function opigno_learning_path_preprocess_views_view_field(&$variables) {
if ($variables['view']
->id() == 'media_browser_images' && $variables['field']->options['id'] == 'name') {
$variables['bundle'] = $variables['view']->field['bundle']->original_value
->jsonSerialize();
}
if ($variables['view']
->id() == 'group_members' && $variables['field']->options['id'] == 'group_roles' && empty($variables['view']->field['group_roles']->original_value)) {
$variables['empty'] = TRUE;
$variables['output'] = $variables['field']->options['empty'];
}
}