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.
This is a sub-task of #2937279: [META] Introduce concept of internal resource types.
This purely introduces a new isInternal()
method to ResourceType and adds a way to set that.
Removing internal resource types from routes, links, and includes will be a separate issue to make reviewing this simpler.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2939704-6.patch | 2.26 KB | gabesullice |
| |||
#6 | interdiff-2939704-6.txt | 1.17 KB | gabesullice |
Comments
Comment #2
gabesulliceComment #3
gabesulliceComment #4
gabesulliceUpdating credits
Comment #5
Wim LeersI'd expect this to
@see
the core interface where this will also be added, and similar docs.Comment #6
gabesullice@Wim Leers, the
@see
is intentionally absent, per #2932035-31: ResourceTypes should be internal when EntityType::isInternal is TRUE.JSON API Extras might make a resource type internal for entirely different reasons than TypedData::isInternal. So they're related concepts but not the same thing.
When we start to use the core method to define internal resource types, we should simply treat it as a "sensible default". Meaning the documentation and
@see
should be next to the relevant code (probably in theResourceTypeRepository
).Nonetheless, this could use more thorough docs.
Comment #7
Wim LeersCompletely agreed!
That sounds better than what I proposed indeed :) In what issue should that happen then?
Comment #8
gabesullice#2932035-30: ResourceTypes should be internal when EntityType::isInternal is TRUE ;)
Comment #9
Wim LeersThe IS says:
But I didn't see why. I checked with @gabesullice and he confirmed it can go in in parallel with #2937961.
Both provide infrastructure necessary for #2932035.
Comment #11
Wim LeersComment #12
gabesulliceWoohoo!
Fixed the IS, FTR.
And for the benefit of any future Drupal.org archivists and archeologists... this actually was blocked by that patch, but after many revisions it was no longer the case.
Comment #13
Wim LeersComment #14
gabesulliceConcurrent editing fail FTW