Updated: Comment 0
Problem/Motivation
A typical .views.inc starts like that:
/**
* @file
* Provide views data and handlers for node.module.
*
* @ingroup views_module_handlers
*/
- This file does not provide handlers anymore. Welcome to Drupal 6, 7 or even 8. Handlers have been functions in the really old days in d5.
There was a time when hook_views_handlers existed - Given that views_module_handlers don't really describe what this is about, maybe come up with a better name like @ingroup views_module_data
Proposed resolution
bla bla
Remaining tasks
User interface changes
API changes
Related Issues
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views.inc-cleanup-2120035-4.patch | 7.46 KB | samhassell |
| #1 | views.inc-cleanup-2120035-1.patch | 8.07 KB | samhassell |
Comments
Comment #1
samhassell commentedSearch and replaced on views_module_handlers, patch attached.
cheers,
Sam.
Comment #2
dawehnerI would like to get an opinion of jhodgdon whether it is okay to use @ingroup like that but otherwise this looks really great!
Thank you!
Comment #3
jhodgdonThis patch should be a *legal* use of @defgroup/@ingroup.
However, I don't think it's really necessary. This patch puts a bunch of files into a @defgroup that doesn't even have any Topic documentation. And the files just contain implementations of hook_views_data and hook_views_data_alter. The list of implementations of each could just be found on the hook pages, and I don't think we really need a defgroup just to make a list of files that match pattern *.views.inc.
https://api.drupal.org/api/drupal/core!modules!views!views.api.php/funct...
So I think the better thing to do would actually be to remove the @defgroup views_handlers entirely, as well as the @ingroup views_handlers lines.
Hm... Actually, looking at the page this patch is attempting to update:
https://api.drupal.org/api/drupal/core!modules!views!views.api.php/group...
it looks like it isn't currently working to put an @ingroup in a @file block. I'm not sure why; will file a bug in the API module about that.
That aside... If for some reason you think it is imperitive to have these files listed on the replacement of that page... A nitpick:
I don't think that a test module should have the @ingroup -- the @defgroup is about modules that provide data for Views, and a test module cannot really be enabled on a site.
Comment #4
samhassell commentedYep it makes sense to remove it if the documentation can be built another way. No need to maintain duplicate docs.
Patch removes the views_module_handlers @ingroup and @defgroup.
Comment #5
jhodgdonThis looks good to me. I think we should move the issue over to the views.module component so that the views module maintainers can comment on whether they think it's OK to get rid of the ingroup entirely. See comment #3.
Comment #6
dawehnerThis line is a bit odd but I am okay with it.
Comment #7
jhodgdonWe could change it to "Provide views data that is not specific to the base table of the view" or something like that?
And as far as the current line being weird, it's just what was already there with the "and handlers" removed. :)
Comment #8
xano4: views.inc-cleanup-2120035-4.patch queued for re-testing.
Comment #9
xano4: views.inc-cleanup-2120035-4.patch queued for re-testing.
Comment #10
jhodgdonViews maintainers have approved. Moving back to documentation so I remember to commit it next time I'm doing commits.
Comment #11
jhodgdonThanks again all -- committed to 8.x.