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

Comments

samhassell’s picture

Status: Active » Needs review
StatusFileSize
new8.07 KB

Search and replaced on views_module_handlers, patch attached.

cheers,
Sam.

dawehner’s picture

Component: views.module » documentation
Status: Needs review » Reviewed & tested by the community

I 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!

jhodgdon’s picture

This 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:

+++ b/core/modules/system/tests/modules/entity_test/entity_test.views.inc
@@ -2,9 +2,9 @@
 
 /**
  * @file
- * Provide views data and handlers for entity_test.module.
+ * Provide views data for entity_test.module.
  *
- * @ingroup views_module_handlers
+ * @ingroup views_module_data
  */

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.

samhassell’s picture

Assigned: Unassigned » samhassell
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new7.46 KB

Yep 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.

jhodgdon’s picture

Component: documentation » views.module

This 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.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/views/views.views.inc
@@ -2,9 +2,7 @@
+ * Provide views data that isn't tied to any other module.

This line is a bit odd but I am okay with it.

jhodgdon’s picture

We 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. :)

xano’s picture

xano’s picture

jhodgdon’s picture

Component: views.module » documentation
Issue summary: View changes

Views maintainers have approved. Moving back to documentation so I remember to commit it next time I'm doing commits.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again all -- committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.