Open for discussion, but I think that _trigger_get_hook_aids() in trigger.module should not be a private function. Any module that creates a trigger (and calls actions_do) needs the functionality in _trigger_get_hook_aids.

I've only found a couple of non-core modules that implement triggers. One of them just copied the code from _trigger_get_hook_aids() while the other one just simply called trigger.module's private function. Now I'm trying to write a module and can't decided which is the lesser of two evils (so I filed this bug instead).

CommentFileSizeAuthor
#2 trigger_aids_public.patch2.17 KBmiro_dietiker

Comments

dave reid’s picture

Version: 6.6 » 7.x-dev

API changes go to the latest development version. Moving to the 7.x issue queue.

miro_dietiker’s picture

Status: Active » Needs review
StatusFileSize
new2.17 KB

I vote for _trigger_get_hook_aids() to be public since there's a clear gap on how to find aid-ID's when you provide advanced actions. We need that interface.
The only option would be to introduce a new trigger_actions_do($hook, $operation, &$object, $context...) but since normalization could not be done generically we simply need trigger_get_hook_aids as an api to fetch aids.

Attached patch to make it public.

Status: Needs review » Needs work

The last submitted patch failed testing.

casey’s picture

Status: Needs work » Fixed

_trigger_get_hook_aids() is gone in D7. I think its replaced with http://api.drupal.org/api/function/trigger_get_assigned_actions/7

Status: Fixed » Closed (fixed)

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