Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293784

Add new hook DATABASEMODULE_views_data_DATABASEDRIVER_alter to the views module

$
0
0

Problem/Motivation

The database driver for MongoDB needs to change the views data after all calls to the hook_views_data_alter() have run. MongoDB stores all entity data for an entity instance in a single document and not in multiple tables as relational databases do. Now there is no such possibility.

Proposed resolution

Add a new hook to the views module called "DATABASEMODULE_views_data_DATABASEDRIVER_alter" to give database drivers to possibility to override the views data after all calls to the hook_views_data_alter() have run. When the database driver is provided by a module, lets say by the mongodb module and the driver name is mongodbtest. Then the function that will be called would be: mongodb_views_data_mongodbtest_alter(). With the same parameter $data by reference as with the hook_views_data_alter().

Remaining tasks

User interface changes

None

API changes

New hook called "DATABASEMODULE_views_data_DATABASEDRIVER_alter".

Data model changes

None

Release notes snippet

None


Viewing all articles
Browse latest Browse all 293784

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>