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.
There's a minor documentation issue in views.api.php
. It says that the views
property should be used on an entity to point at the class that implements EntityViewsDataInterface
. This is wrong; it should be the handlers.views_data
property. This is what content entity types like Node
and File
do.
Going to attach a patch that tries to clarify this. Honestly, I think I could do better. Maybe we could add a @see
so that the person can find a good example more easily?
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff_10-12.txt | 754 bytes | ayushmishra206 |
#12 | 2470753-12.patch | 1.11 KB | ayushmishra206 |
#10 | 2470753-10.patch | 1.11 KB | Lendude |
#1 | 2470753_views_data_documentation.patch | 775 bytes | wizonesolutions |
Comments
Comment #1
wizonesolutionsVoilà.
Comment #10
LendudeCleaning up old bugs.
Docs are still wrong after all these years :)
Fixed the line wrapping at 80 characters.
Comment #11
longwaveTypo: th -> the
Comment #12
ayushmishra206 CreditAttribution: ayushmishra206 at OpenSense Labs commentedCorrected the typo in #10.
Comment #13
ayushmishra206 CreditAttribution: ayushmishra206 at OpenSense Labs commentedComment #14
longwaveComment #15
alexpottCommitted and pushed dddfc88551 to 9.2.x and 6632bbfa21 to 9.1.x. Thanks!
Backported to 9.1.x since this is a docs fix.