It would be useful to have hooks around component events so that e.g. caches could be cleared, record additional watchdog messages, yadda, yadda.

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new2.73 KB

Have attached a patch that provides three hooks:

  • hook_webform_component_insert()
  • hook_webform_component_update()
  • hook_webform_component_delete()
damienmckenna’s picture

StatusFileSize
new3.3 KB

A corrected patch that fixes the hook_webform_component_update() happening after the update function had already returned, i.e. it never executed.

quicksketch’s picture

Version: 6.x-2.x-dev »
Status: Needs review » Fixed

I've added this to the 3.x branch, plus a hook for "presave" so that we match our existing hooks for submissions. Also added documentation and an explanation why we don't have a "load" operation.

damienmckenna’s picture

Excellent, thank you.

quicksketch’s picture

StatusFileSize
new5.75 KB

Seems I didn't attach the patch. Here's the set of changes.

Status: Fixed » Closed (fixed)

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