0

I want to override field_sql_storage_field_storage_write(), defined in /modules/field/modules/field_sql_storage/field_sql_storage.module.

I tried with MYMODULE_field_storage_write_alter($entity_type, $entity, $op, $fields), but it doesn't work.

How should I override that function?

3
  • This question has neither CODE NEED TO MODIFY embedded (why not just name the CORE function with link to api.drupal.org?) not your own effort to show what to alter. Commented Aug 19, 2017 at 6:39
  • done, url added Commented Aug 19, 2017 at 6:50
  • My comment above asked for what you want to accomplish in weird words ;). I added an answer but it depends on your needs. Commented Aug 20, 2017 at 7:49

1 Answer 1

0

You could try hook_field_storage_info_alter

Other candidates are

  1. hook_field_insert
  2. hook_field_update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.