function accessibility_reporting_views_data

cis7 accessibility_reporting.views.inc accessibility_reporting_views_data()
cle7 accessibility_reporting.views.inc accessibility_reporting_views_data()
elmsmedia7 accessibility_reporting.views.inc accessibility_reporting_views_data()
icor7 accessibility_reporting.views.inc accessibility_reporting_views_data()
meedjum_blog7 accessibility_reporting.views.inc accessibility_reporting_views_data()
mooc7 accessibility_reporting.views.inc accessibility_reporting_views_data()

Implements hook_views_data().

File

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

Code

function accessibility_reporting_views_data() {
  // Define the base group of this table.
  $data['accessibility_reporting']['table']['group'] = t('Accessibility reporting');

  $data['accessibility_reporting']['field'] = array(
    'title' => t('Responsible field'),
    'help' => t('The field in the entity that had the error.'),
    'field' => array(
      'handler' => 'views_handler_accessibility_reporting_field',
    ),
    'argument' => array(
      'handler' => 'views_handler_argument_string',
      'numeric' => TRUE,
    ),
    'filter' => array(
      'handler' => 'views_handler_filter',
    ),
    'sort' => array(
      'handler' => 'views_handler_sort',
    ),
  );

  $data['accessibility_reporting']['total'] = array(
    'title' => t('Total errors'),
    'help' => t('Total number of errors in a field.'),
    'field' => array(
      'handler' => 'views_handler_field_numeric',
      'click sortable' => TRUE,
    ),
    'argument' => array(
      'handler' => 'views_handler_argument_numeric',
      'numeric' => TRUE,
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_numeric',
    ),
    'sort' => array(
      'handler' => 'views_handler_sort',
    ),
  );

  $data['accessibility_reporting']['accessibility_test'] = array(
    'title' => t('Accessibility test'),
    'help' => t('The accessibility test that failed.'),
    'relationship' => array(
      'label' => t('Accessibility test'),
      'base' => 'accessibility_test',
      'base field' => 'test_id',
      'relationship field' => 'test_id',
    ),
  );

  return $data;
}