Skip to content
Snippets Groups Projects
Commit c9fd5715 authored by Jess's avatar Jess Committed by Tim Plunkett
Browse files

Issue #1808756 by xjm: Remove outdated information from hook_views_data() and...

Issue #1808756 by xjm: Remove outdated information from hook_views_data() and hook_views_data_alter().
parent 8f61b789
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -288,14 +288,9 @@
*/
/**
* Describes data tables (or the equivalent) to Views.
* Describe data tables (or the equivalent) to Views.
*
* This hook should be placed in MODULENAME.views.inc and it will be
* auto-loaded. MODULENAME.views.inc must be in the directory specified by the
* 'path' key returned by MODULENAME_views_api(), or the same directory as the
* .module file, if 'path' is unspecified.
*
* @return
* @return array
* An associative array describing the data structure. Primary key is the
* name used internally by Views for the table(s) – usually the actual table
* name. The values for the key entries are described in detail below.
......@@ -454,22 +449,15 @@ function hook_views_data() {
}
/**
* Alter table structure.
*
* You can add/edit/remove existing tables defined by hook_views_data().
*
* This hook should be placed in MODULENAME.views.inc and it will be
* auto-loaded. MODULENAME.views.inc must be in the directory specified by the
* 'path' key returned by MODULENAME_views_api(), or the same directory as the
* .module file, if 'path' is unspecified.
* Alter the table structure defined by hook_views_data().
*
* @param $data
* @param array $data
* An array of all Views data, passed by reference. See hook_views_data() for
* structure.
*
* @see hook_views_data()
*/
function hook_views_data_alter(&$data) {
function hook_views_data_alter(array &$data) {
// This example alters the title of the node:nid field in the Views UI.
$data['node']['nid']['title'] = t('Node-Nid');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment