You are here

lightning_media_document.module in Lightning Media 8

Support for file media assets in Lightning.

File

modules/lightning_media_document/lightning_media_document.module
View source
<?php

/**
 * @file
 * Support for file media assets in Lightning.
 */
use Drupal\lightning_core\OverrideHelper as Override;
use Drupal\lightning_media_document\Plugin\media\Source\File;

/**
 * Implements hook_media_source_info_alter().
 */
function lightning_media_document_media_source_info_alter(array &$sources) {
  $sources['file']['input_match']['field_types'] = [
    'file',
  ];
  Override::pluginClass($sources['file'], File::class);
}