Convert book settings to the new configuration system
The book settings at :
admin/content/book/settings
admin/structure/block/manage/book/navigation/configure aka hook_block_configure
Tasks
Create a default config file and add it to the module.
Convert the admin UI in core/modules/book/book.admin.inc core/modules/book/book.module to read to/write from the appropriate config.
Convert any book code that currently accesses the variables used to use the config system.
Write an upgrade path from D7 -> D8 to migrate existing data to the new system and drop the appropriate variables.
This would be a good task for someone wanting to get up to speed on how the new config system works. That would be me, chriscalip.
Comment | File | Size | Author |
---|---|---|---|
#25 | interdiff.txt | 370 bytes | no_commit_credit |
#24 | book-1703164-24.patch | 7.34 KB | no_commit_credit |
Comments
Comment #1
chriscalip CreditAttribution: chriscalip commentedfirst try.
Comment #2
chriscalip CreditAttribution: chriscalip commentedComment #3
cosmicdreams CreditAttribution: cosmicdreams commentedNeed to add a newline here.
Great work!
Comment #4
chriscalip CreditAttribution: chriscalip commenteda.) per #3 drupal coding standards compliance code change, adding new line.
b.) variable name changes; updated mapping name to correct one from 'all_pages' to intended 'block_mode'
Comment #6
cosmicdreams CreditAttribution: cosmicdreams commentedChris, two things
1. you need a config directory with your yml file in the patch
2. you should look at the book tests and see if there are things you need to change in there for handling these variables. A find and replace on the variable_get and variable_sets in there.
Comment #7
chriscalip CreditAttribution: chriscalip commentedChris,
Yeah my git diff patch didnt take into account the added new file.
adding now..
Comment #8
cosmicdreams CreditAttribution: cosmicdreams commentedNo newline
Comment #9
chriscalip CreditAttribution: chriscalip commentedadding line.
Comment #10
chriscalip CreditAttribution: chriscalip commentedComment #11
aspilicious CreditAttribution: aspilicious commentedone newline to much
Besides of that this looks good
-29 days to next Drupal core point release.
Comment #12
chriscalip CreditAttribution: chriscalip commentedremoved a line too far.
Comment #13
chriscalip CreditAttribution: chriscalip commentedComment #14
aspilicious CreditAttribution: aspilicious commentedLooks like there still is a line to much... damnit, srry for that. It just must end with a newline so if you remove all the trailing lines and press enter after "all pages" it should be fine
-29 days to next Drupal core point release.
Comment #15
chriscalip CreditAttribution: chriscalip commentedno worries, i'm just not used to yml on my ide.. spacing dyslexia
Comment #16
sun&$form_state always needs to be taken by reference. :)
I think I'd expect to find this in the key block.navigation.mode
Comment #17
aspilicious CreditAttribution: aspilicious commentedLets see...
Comment #18
alexpottReally, really minor nitpick...
@see book_admin_settings() is superflous here
Comment #19
aspilicious CreditAttribution: aspilicious commentedactually it has to point to the validate function: http://drupal.org/node/1354#forms
Comment #20
kbasarab CreditAttribution: kbasarab commentedHere's the change from @see book_admin_settings() to @see book_admin_settings_vaidate()
Comment #21
alexpottNeed to update
'block_mode'
to the new config key'block.navigation.mode'
Comment #22
kbasarab CreditAttribution: kbasarab commentedUpdated.
Comment #23
alexpottLooks good to go! Thanks for all the work!
Comment #24
no_commit_credit CreditAttribution: no_commit_credit commentedCorrected update hook docblock to use the imperative as per our standard:
http://drupal.org/node/1354#hookimpl
Comment #25
no_commit_credit CreditAttribution: no_commit_credit commentedKeep forgetting to attach interdiffs. :)
And, the name of this account is
no_commit_credit
. Which means, I did not actually contribute to this patch, so please don't mention the account in the commit message.Comment #26
Dries CreditAttribution: Dries commentedCommitted to 8.x.
Comment #27
sunThanks!
Comment #28.0
(not verified) CreditAttribution: commentedadded another related link.
Comment #29
andypostThis was wrong conversion, followup is #315176: Clean-up remains of $form['array_filter'] hack with array_filter in book module