Needs work
Project:
Drupal core
Version:
main
Component:
options.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Nov 2021 at 02:07 UTC
Updated:
20 Apr 2026 at 14:19 UTC
Jump to comment: Most recent
Comments
Comment #2
larowlanComment #3
larowlanComment #4
larowlanComment #5
dpiComment #6
dpiComment #9
duadua commentedComment #10
duadua commentedComment #11
duadua commentedComment #12
dpi@duadua do you have any narrative to add or is your MR pure experimentation?
I'd suggest creating a personal patch issue if its the latter, for example #3099942: [ignore] @dpi's patch testing issue
Comment #13
duadua commented@dpi
That's a great recommendation. I'll do that and experiment a bit more first, before posting a MR into this issue.
Comment #14
duadua commented@dpi
To be honest I am confused whether to create MRs against 10.1.x or 11.x at this point.
Comment #15
larowlanLeft some comments on the MR
We have some failing custom commands here (likely linting)
Comment #16
dieterholvoet commentedComment #18
acbramley commentedIn #3538277: Add NodePreview enum and replace usage of DRUPAL_DISABLED, DRUPAL_OPTIONAL and DRUPAL_REQUIRED I'm looking to add a trait that allows you to do this very easily (although not quite like what is being proposed in the current MR).
The OptionsEnumTrait adds
::asOptionsto an enum and forces alabelmethod to be implemented. You can then useMyEnum::asOptionsin the FAPI#optionskey, and also for things like field storage definitions with theallowed_values_functionkeyComment #20
joachim commentedWe need to make sure this is going to be compatible with #3468351: add enum support to Option field types.