function accessibility_reporting_views_data_alter

cis7 accessibility_reporting.views.inc accessibility_reporting_views_data_alter(&$data)
cle7 accessibility_reporting.views.inc accessibility_reporting_views_data_alter(&$data)
elmsmedia7 accessibility_reporting.views.inc accessibility_reporting_views_data_alter(&$data)
icor7 accessibility_reporting.views.inc accessibility_reporting_views_data_alter(&$data)
meedjum_blog7 accessibility_reporting.views.inc accessibility_reporting_views_data_alter(&$data)
mooc7 accessibility_reporting.views.inc accessibility_reporting_views_data_alter(&$data)

Implements hook_views_data_alter().

File

sites/all/modules/ulmus/accessibility/modules/accessibility_reporting/views/accessibility_reporting.views.inc, line 69
Exposes reporting data to views.

Code

function accessibility_reporting_views_data_alter(&$data) {
  // Load information for entity types so we can find their base tables
  $entity_infos = entity_get_info();
  $entity_tables = array();
  foreach ($entity_infos as $entity_type => $entity_info) {
    if (isset($entity_info['base table'])) {
      $data[$entity_info['base table']]['accessibility_reporting_base_left_' . $entity_info['base table']] = array(
        'title' => t('Accessibility reporting results'),
        'help' => t('Provides a relationship from entities to the appropriate accessibility reporting'),
        'relationship' => array(
          'label' => t('Reporting'),
          'title' => t('Accessibility report results'),
          'base' => 'accessibility_reporting',
          'base field' => 'entity_id',
          'relationship field' => $entity_info['entity keys']['id'],
          'entity_type_left' => $entity_type,
          'handler' => 'views_handler_relationship',
        ),
      );
    }
  }

}