summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc41
1 files changed, 22 insertions, 19 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc
index d49385c..243cbc7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc
@@ -1,19 +1,14 @@
<?php
-/**
- * @file
- *
- * Provide views data and handlers for system tables that are not represented by
- * their own module.
- */
/**
- * @defgroup views_system_module system.module handlers
+ * @file
+ * Provide views data and handlers for system.module.
*
- * @{
+ * @ingroup views_module_handlers
*/
/**
- * Implements hook_views_data()
+ * Implements hook_views_data().
*/
function system_views_data() {
$data = array();
@@ -35,11 +30,6 @@ function system_views_data() {
);
$data['file_managed']['table']['entity type'] = 'file';
-
- // The file table does not inherently join to the node table,
- // but may things (such as upload.module) can add relationships
- // that allow file fields to be used.
-
// fid
$data['file_managed']['fid'] = array(
'title' => t('File ID'),
@@ -253,7 +243,7 @@ function system_views_data() {
'base' => 'node',
'base field' => 'nid',
'relationship field' => 'id',
- 'extra' => array(array('field' => 'type', 'value' => 'node')),
+ 'extra' => array(array('table' => 'file_usage', 'field' => 'type', 'operator' => '=', 'value' => 'node')),
),
);
$data['file_usage']['node_to_file'] = array(
@@ -431,6 +421,23 @@ function system_views_data() {
'handler' => 'views_handler_sort',
),
);
+ $data['file_usage']['id'] = array(
+ 'title' => t('Entity ID'),
+ 'help' => t('The ID of the entity that is related to the file.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_numeric',
+ 'click sortable' => TRUE,
+ ),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_numeric',
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_numeric',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
$data['file_usage']['count'] = array(
'title' => t('Use count'),
'help' => t('The number of times the file is used by this entity.'),
@@ -569,7 +576,3 @@ function _views_file_status($choice = NULL) {
return $status;
}
-
-/**
- * @}
- */