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_forbidwas usingmoduleproperty of$field_storagechanged it to usegetTypeProvider()to get name of the module which provides this field.Comment #7
sudiptadas19 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