You are here

function file_aliases_views_data_alter in File Aliases 6

Implements hook_views_data_alter().

File

includes/file_aliases.views.inc, line 35
Contains views data and handlers for the File Aliases module.

Code

function file_aliases_views_data_alter(&$data) {
  $data['files']['filealias'] = array(
    'title' => t('Path Alias'),
    'help' => t('The path alias of the file.'),
    'field' => array(
      'handler' => 'file_aliases_views_handler_field_file',
      'click sortable' => TRUE,
    ),
  );

  // Invoke file_aliases_hook_views_data_alter().
  foreach (module_list() as $module) {
    if (function_exists($function = 'file_aliases_' . $module . '_views_data_alter')) {
      $function($data);
    }
  }
}