You are here

thunder_riddle.module in Thunder 8.2

Thunder riddle install hooks.

File

modules/thunder_article/modules/thunder_riddle/thunder_riddle.module
View source
<?php

/**
 * @file
 * Thunder riddle install hooks.
 */

/**
 * Implements hook_menu_local_actions_alter().
 */
function thunder_riddle_menu_local_actions_alter(&$local_actions) {
  $view = \Drupal::entityTypeManager()
    ->getStorage('view')
    ->load('thunder_media');
  if ($view) {
    $local_actions['riddle_marketplace.import']['appears_on'][] = 'view.thunder_media.media_page_list';
  }
}

/**
 * Implements template_preprocess_views_view().
 */
function thunder_riddle_preprocess_views_view(&$variables) {
  if ($variables['view']
    ->id() == 'riddle_browser') {
    $variables['view_array']['#attached']['library'][] = 'thunder_riddle/entity_browser_view';
  }
}