5 * Provides views data for blazy.module.
9 * Implements hook_views_data_alter().
11 function blazy_views_data_alter(&$data) {
12 $data['file_managed']['blazy_file'] = [
14 'help' => t('Displays a preview of a File using Blazy, if applicable.'),
17 'click sortable' => FALSE,
20 if (\Drupal::moduleHandler()->moduleExists('video_embed_media')) {
21 $data['media_field_data']['blazy_media'] = [
23 'help' => t('Displays a preview of a Media using Blazy, if applicable.'),
25 'id' => 'blazy_media',
26 'click sortable' => FALSE,
33 * Implements hook_views_plugins_style_alter().
35 function blazy_views_plugins_style_alter(array &$plugins) {
38 'label' => 'Blazy Grid',
39 'description' => t('Display the results in a Blazy grid.'),
40 'class' => 'Drupal\blazy\Plugin\views\style\BlazyViews',
41 'display_types' => ['normal'],
42 'help' => t('Works best with Views field containing Blazy.'),
44 'plugin_type' => 'style',
45 'register_theme' => FALSE,
46 'short_title' => 'Blazy',
47 'title' => 'Blazy Grid',
48 'provider' => 'blazy',