Problem/Motivation
Follow-up to #2851705: [meta] Deprecate DRUPAL_DISABLED, DRUPAL_OPTIONAL and DRUPAL_REQUIRED
We will have an enum for NodePreview states which can be used in NodeTypeInterface::get/setPreviewMode
Proposed resolution
Not sure the best way to do this while maintaining BC, most likely:
- Add deprecated $returnAsInt param to getPreviewMode and update return type to int|NodePreview
- Update usages in core of getPreviewMode to expect NodePreview enum
- Allow int|NodePreview in setPreviewMode
- Update usages in core of setPreviewMode to use the NodePreview enum
Remaining tasks
Do it
API changes
NodeTypeInterface::getPreviewMode and NodeTypeInterface::setPreviewMode now interact with the NodePreview enum
Release notes snippet
Comments
Comment #2
acbramley commentedComment #3
acbramley commentedDupe of #3538277: Add NodePreview enum and replace usage of DRUPAL_DISABLED, DRUPAL_OPTIONAL and DRUPAL_REQUIRED
Comment #4
acbramley commented