Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By bboldi on
I'm trying to implement actions - trigger support in my module (not standard NODE / USER / TAXONOMY actions, but my custom ones). Can anyone point me to some documentation which describes this in details, or perhaps give me a hand with this problem. Thanks in advance.
I understand that
hook_hook_info()
is responsible for letting the engine know about available actions, and I assume that
hook_action_info()
is responsible for providing triggers, but there is no info about this hook in api doc.
sorry for my English.
Comments
I' ve found some more info, but I still need help...
here is the description for hook_action_info
http://drupal.org/files/issues/hook_action_info_d6.patch
----------------------------------------
Boldizsár Bednárik ing.
http://www.bboldi.com
Creating Actions is fairly
Creating Actions is fairly straight forward and works as documented here:
http://drupal.org/node/172152
Creating triggers is definitely possible, but not very well documented, and I'd recommend looking at the simplest of the existing trigger implementations - maybe node.module...
You may find some triggers help in this talk...
http://www.archive.org/details/DrupalconBoston2008-TriggersAndActionsAnd...
Later,
Chris.
http://www.trailheadinteractive.com
http://www.trailheadinteractive.com
thanks
Thanks man!
----------------------------------------
Boldizsár Bednárik ing.
http://www.bboldi.com
Action-Trigger creation, usage, module development - Solved :)
Here is a sample module code I wrote to demonstrate the method for defining new actions and triggers and join them together. I hope it will help the community ;)
This code will add a new tab to the trigger page named "action trigger sample", it's simple and understundable... i hope...
----------------------------------------
Boldizsár Bednárik ing.
http://www.bboldi.com
HI, where should this code
HI, where should this code be placed?
In a custom module, or in actions.inc or somewhere else entirely?
Thanks
Dave
it's a sample custom module.
it's a sample custom module.
Wow, just reread this - you'd
Wow, just reread this - you'd think I would've copped that from where you said "Here is a sample module code I wrote"! Cheers man, sorry for the silly question!
Dave