function blazy_views_data_alter in Blazy 8
Same name and namespace in other branches
- 8.2 blazy.views.inc \blazy_views_data_alter()
- 7 blazy.views.inc \blazy_views_data_alter()
Implements hook_views_data_alter().
File
- ./
blazy.views.inc, line 11 - Provides views data for blazy.module.
Code
function blazy_views_data_alter(&$data) {
$data['file_managed']['blazy_file'] = [
'title' => 'Blazy',
'help' => t('Displays a preview of a File using Blazy, if applicable.'),
'field' => [
'id' => 'blazy_file',
'click sortable' => FALSE,
],
];
if (\Drupal::moduleHandler()
->moduleExists('video_embed_media')) {
$data['media_field_data']['blazy_media'] = [
'title' => 'Blazy',
'help' => t('Displays a preview of a Media using Blazy, if applicable.'),
'field' => [
'id' => 'blazy_media',
'click sortable' => FALSE,
],
];
}
}