Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
API documentation should provide useful examples.
Steps to reproduce
Try to implement specified hook using provided example condition :
if ($field_storage->module == 'options') {
Proposed resolution
Replace API documentation with the up to date implementation from options module.
Remaining tasks
- Patch
- Review
- Commit
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
TBD, if needed.
Issue fork drupal-3199582
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 #6
ShriaasMade required changes in !341
hook_field_storage_config_update_forbid
was usingmodule
property of$field_storage
changed it to usegetTypeProvider()
to get name of the module which provides this field.Comment #7
sudiptadas19 CreditAttribution: sudiptadas19 at QED42 for Drupal India Association commentedChanges are done as per the options modules implementation as suggested.
Changes look good to me.
Comment #11
larowlanMerged the MR, cherry-picked to 9.1.x
Thanks