Loading uuid.module +10 −0 Changes for uuid.module: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -135,6 +135,16 @@ function uuid_node_load($node) { } } /** * Implementation of hook_views_api(). */ function uuid_views_api() { return array( 'api' => 2, 'path' => drupal_get_path('module', 'uuid'), ); } /** * Returns the node associated with a UUID. Uses db_rewrite_sql() to ensure * node_access rules are preserved. Loading uuid.views.inc 0 → 100644 +59 −0 Changes for uuid.views.inc: 59 added lines, 0 removed lines. Original line number Diff line number Diff line <?php /** * @file * Views Implementation for UUID. */ /** * Implementation of hook_views_data(). */ function uuid_views_data() { $data = array(); module_load_include('install', 'uuid'); $tables = uuid_schema(); foreach ($tables as $table => $schema) { $base_table = str_replace('uuid_', '', $table); $field = array_shift(array_keys($schema['fields'])); $data[$table]['table'] = array( 'group' => 'UUID', 'join' => array( $base_table => array( 'left_field' => $field, 'field' => $field, ), ) ); $data[$table]['uuid'] = array( 'title' => t('@table UUID', array('@table' => ucwords($base_table))), 'help' => t( 'Universally Unique Identifier for @table objects.', array('@table' => ucwords($base_table)) ), 'field' => array( 'handler' => 'views_handler_field', 'click sortable' => TRUE, ), 'filter' => array( 'handler' => 'views_handler_filter_string', 'allow empty' => TRUE, 'help' => 'Filter on a UUID', ), 'argument' => array( 'handler' => 'views_handler_argument_string', 'help' => 'Argument on a UUID', ), 'sort' => array( 'handler' => 'views_handler_sort', 'help' => 'Sort on UUID', ), ); } return $data; } Loading
uuid.module +10 −0 Changes for uuid.module: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -135,6 +135,16 @@ function uuid_node_load($node) { } } /** * Implementation of hook_views_api(). */ function uuid_views_api() { return array( 'api' => 2, 'path' => drupal_get_path('module', 'uuid'), ); } /** * Returns the node associated with a UUID. Uses db_rewrite_sql() to ensure * node_access rules are preserved. Loading
uuid.views.inc 0 → 100644 +59 −0 Changes for uuid.views.inc: 59 added lines, 0 removed lines. Original line number Diff line number Diff line <?php /** * @file * Views Implementation for UUID. */ /** * Implementation of hook_views_data(). */ function uuid_views_data() { $data = array(); module_load_include('install', 'uuid'); $tables = uuid_schema(); foreach ($tables as $table => $schema) { $base_table = str_replace('uuid_', '', $table); $field = array_shift(array_keys($schema['fields'])); $data[$table]['table'] = array( 'group' => 'UUID', 'join' => array( $base_table => array( 'left_field' => $field, 'field' => $field, ), ) ); $data[$table]['uuid'] = array( 'title' => t('@table UUID', array('@table' => ucwords($base_table))), 'help' => t( 'Universally Unique Identifier for @table objects.', array('@table' => ucwords($base_table)) ), 'field' => array( 'handler' => 'views_handler_field', 'click sortable' => TRUE, ), 'filter' => array( 'handler' => 'views_handler_filter_string', 'allow empty' => TRUE, 'help' => 'Filter on a UUID', ), 'argument' => array( 'handler' => 'views_handler_argument_string', 'help' => 'Argument on a UUID', ), 'sort' => array( 'handler' => 'views_handler_sort', 'help' => 'Sort on UUID', ), ); } return $data; }