You are here

function opigno_messaging_preprocess_views_view in Opigno messaging 8

Same name and namespace in other branches
  1. 3.x opigno_messaging.module \opigno_messaging_preprocess_views_view()

Implements hook_preprocess_views_view().

File

./opigno_messaging.module, line 607
Contains opigno_messaging.module.

Code

function opigno_messaging_preprocess_views_view(&$vars) {

  // Attach js & css to view.
  if (isset($vars['view_array']['#name']) && $vars['view_array']['#name'] === 'private_message') {
    $vars['#attached']['library'][] = 'opigno_messaging/view_private_message';
    $vars['#attached']['drupalSettings']['multiLingual'] = \Drupal::languageManager()
      ->isMultilingual();
  }
}