Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The API doc isn't formatted correctly for core, refers to advanced help, and hasn't been updated at all for the D8 API changes.
Comment | File | Size | Author |
---|---|---|---|
#3 | views-plugin-docs-1808756-3.patch | 16.25 KB | xjm |
#2 | views-plugin-docs-1808756-2.patch | 19.6 KB | xjm |
Comments
Comment #1
xjmI started by simply making it core-compatible. Next removing hooks that don't exist anymore, along with all references to them elsewhere.
Comment #2
xjmRemoving references to
hook_views_plugins()
also means updating the the generic plugin documentation. I'm mostly punting on that for now. Followup tasks:@ingroup views_plugin
to all our goddamn plugin classes. :)I'd like a review on this before I commit it since it involves several actual docs changes. The lines about the plugin options were just cut from the
hook_views_plugins()
docblock and moved up to the defgroup; I haven't proofread them. We can do that later when we move them to the right place.Comment #3
xjmRemoving the old plugin options stuff as well; @timplunkett suggested that we should just rewrite it from scratch, so we can do that when we improve the plugin docs later.
Comment #4
xjmAlright, #3 is committed.
Comment #5
xjmWorking on the rest.
Comment #6
dawehner.
Comment #7
xjmI pushed updates to the the handler and plugin defgroups; I'd appreciate it if someone could review them.
I think there's still several more hook docblocks I need to check.
Comment #8
xjmEr, to clarify, they're in 8.x-3.x:
http://drupalcode.org/project/views.git/blob/refs/heads/8.x-3.x:/views.a...
Comment #9
dawehnerSo what will happen if we have more then 80 signs for namespace + classname :)
From my perspective the hardest problem people have with writing views plugins is that they don't know
how to find existing examples, they google for it, but they don't stumble upon the one in views itself. I think
this should be made clear in the documentation here.
I guess it is safe in d8 to remove the previously reference?
I'm wondering whether it is useful to refer to possible contrib examples (like views xml backend) for a core api file.
Comment #10
xjmWell, there's an @todo to add examples eventually, but maybe an explicit "Look in the lib/Drupal/views/Plugin/Views" folder would help?
Re: 80 characters, when the line contains only something that can't be broken onto multiple lines, it's the only time it's okay to go over 80 characters.
I'll remove the stale references.
Comment #11
xjmStarted pulling on the spaghetti that is
hook_views_data()
this morning.hook_views_data()
andhook_views_data_alter()
_views_fetch_data_build()
incache.inc
_views_fetch_data()
views_fetch_data()
ViewExecutable::initQuery()
and any number of base plugins and handlers, as well as used for the admin UI.Comment #12
xjmAlright,
views.api.php
is all cleaned up now. It still eventually needs more documentation for plugins and on the hook execution order, but as far as I know everything is now correct for D8.Edit: hook_views_data() might also need some work, but I will file followup issues.
Comment #13
xjm