thunder_riddle.module in Thunder 8.2
Same filename and directory in other branches
Thunder riddle install hooks.
File
modules/thunder_article/modules/thunder_riddle/thunder_riddle.moduleView 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';
}
}
Functions
Name | Description |
---|---|
thunder_riddle_menu_local_actions_alter | Implements hook_menu_local_actions_alter(). |
thunder_riddle_preprocess_views_view | Implements template_preprocess_views_view(). |