Problem/Motivation
Once the field is ready in #3336935: Create "Rabbit Hole" field type for overrides, let's make it not configurable via UI. Basically, we have to replicate the Layout Builder feature, where field with section overrides becomes available when "Override" option is enabled.
In our case, the checkbox that either enables or disables the field is available on Rabbit Hole bundle settings:
1) Go to /admin/config/content/rabbit-hole/ page;
2) Configure one of the content types;
3) "Allow these settings to be overridden for individual entities";
If the checkbox is selected, the field should be available, and vice versa.
Please look into Layout Builder implementation for the inspiration:
LayoutBuilderEntityViewDisplay::addSectionField()
Issue fork rabbit_hole-3336951
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
matroskeenComment #3
matroskeenComment #4
alt.dev CreditAttribution: alt.dev at DevBranch, Drupal Ukraine Community, Evolving Web commentedComment #7
matroskeenFor me, it works like a charm. Thank you!