This ties into #407612: Process existing FID's. We need a mechanism of passing actions and needed data back to the module that is registered as the handler. For the time being I have implemented an experimental hook_media_action consisting of the following:

  • added a 'registered_module' value to the $form so that we don't have to do a bunch of lookups to find out what module we should pass the action off to in media_browser_submit().
  • The hook_media_action function is immediately called and passed $form, $form_status, and $op.
  • The intention is that the module developer adds a switch statement on $op to handle the various actions.

The upside to this kind of implementation is flexibility down the road, but with the risk of inconsistent usage. Additionally, currently up for discussion is the issue of action chaining and if it's something that we want to address.

Comments

aaron’s picture

Status: Active » Fixed

not sure this applies anymore. we may need to revisit. marking as fixed, we can open a new issue examining current architecture.

Status: Fixed » Closed (fixed)
Issue tags: -gsoc, -gsoc2009, -gsoc2009-jmstacey

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