This module allows module developers to very quickly get the basic code required to expose their data through Views. It does so by adding a tab to the standard ones provided by Schema module (Schema module is a dependency for this module, but you were already using that, right?!). Its contents is similar to Schema's Inspect tab, but instead of Schema API code to be pasted in your .install file, it generates scaffolding code to be pasted into your .views.inc file. This gives you a head start on Views integration for your module. You will still need to complete the code, such as assigning the correct field handlers and define relationships, but it takes some of the tediousness out of writing Views integration code.
If you are unfamiliar with writing Views integration code, consult the Advanced Help documentation that comes with Views. (Please do not use this module's issue queue to get support on writing Views integration code, use the proper support channels for that). It is also hosted online at http://views-help.doc.logrus.com/help/views/api (this is the section on the API). Pay special attention to "Describing tables to Views"; this is the part that Schema Views will largely do for you. Do make sure you actually understand what is going on; as said, Schema Views will do a lot of the leg work, but you will still need to check and possibly complete/change the code.
Note on similar modules
Note, that there is a similarly named module, which also accomplishes the task of exposing your module's data to Views, Views Schema. I even contemplated picking a different name for this module because it would surely cause a lot of confusion. Schema Views is just what it does, though, so I stuck with the name.
The essential difference between this module and Views Schema is that the other module works at runtime; it will analyse your tables and will generate the Views datastructures on the fly. You may then alter these through hook_views_data_alter(). This also means that if you use it to get Views integration for your module's data, your module will need to depend on it, and thus users of your module will need to install it. This for me was the reason to actually write Schema Views, because Views Integration did not seem to me something I should require an extra module dependency for. I did, however, feel the need to take some of the tediousness out of writing Views integration code.
Schema Views, then, works in a similar fashion to Schema module, which it extends. It will generate the required code to write pure, code-only Views integration, just as you would have written it if you did it all by hand; it simply gives you a head start over when coding it by hand, with no strings attached. The users of your module do not need to install any extra modules.
Schema Views is sponsored and maintained by the juggernauts of ProjectPAAS.com.
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 274 sites currently report using this module. View usage statistics.
- Downloads: 2,978
- Last modified: December 2, 2014
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.