Problem/Motivation
It would be great if you could enable this for just one content type for example and nothing else.
Proposed resolution
Add a simple config object for storing a list of entity types and bundles which should receive the preview link treatment. Allowing developers to customise the allowed entity types/bundles.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3033759-11.patch | 7.59 KB | sam152 |
| #11 | interdiff.txt | 780 bytes | sam152 |
| #4 | 3033759-4.patch | 7.63 KB | sam152 |
| #4 | interdiff.txt | 1.86 KB | sam152 |
Comments
Comment #2
sam152 commentedComment #3
fenstratLooking really good, just one super minor nit.
Nit: allowed > enabled
Comment #4
sam152 commentedGood catch, fixing terminology.
Comment #5
fenstrat.
Comment #6
benjy commentedLGTM
Comment #7
larowlando we need to check the installed version here so this only runs on existing sites?
Comment #8
jibranThis needs to update hook because we are adding the new schema.
Comment #9
sam152 commentedRe: #7, these updates only run on sites with the module already installed right?
Re: #8, if updb installs the new schema, wouldn't I want a post update here to ensure the schema is present before adding the new config?
Comment #10
jibranupdb doesn't install new schema.
schema should be valid before running post-update hooks. As we are adding the new schema that means after updating the codebase site will have invalid schema so it should be fixed by hook_update_N.
Comment #11
sam152 commentedI don't think an object not existing counts as invalid schema, but reading the docs this seems like the right approach for new schema on existing objects, so may as well follow suit with that.
Comment #12
jibranThanks!
Comment #14
sam152 commentedThanks folks.