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

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoSk0 created an issue. See original summary.

shriaas2898 made their first commit to this issue’s fork.

Shriaas’s picture

Status: Active » Needs review

Made required changes in !341
hook_field_storage_config_update_forbid was using module property of $field_storage changed it to use getTypeProvider() to get name of the module which provides this field.

sudiptadas19’s picture

Status: Needs review » Reviewed & tested by the community

Changes are done as per the options modules implementation as suggested.
Changes look good to me.

larowlan made their first commit to this issue’s fork.

  • larowlan committed 346d176 on 9.2.x authored by shriaas2898
    Issue #3199582 by shriaas2898: hook_field_storage_config_update_forbid...

  • larowlan committed 31ef5fd on 9.1.x authored by shriaas2898
    Issue #3199582 by shriaas2898: hook_field_storage_config_update_forbid...
larowlan’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Merged the MR, cherry-picked to 9.1.x

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.