There are no any action defined in the trigger module. How do we do with that one? do we create an actions example, or do we put actions in the trigger module? it should include simple actions, and advanced actions (configurable).

Comments

rfay’s picture

Title: Actions, its own module or integrated in triggers » Create actions example module

I guess I'm in favor of a separate module. That way people can just look at one line of code. In that case we should use core-provided triggers only for the example.

ilo’s picture

Assigned: Unassigned » ilo

ay ay sir! I'm going to take the triggers example as template in this case.

ilo’s picture

ilo’s picture

Component: Trigger Example » Action Example
Status: Active » Needs review
StatusFileSize
new15.89 KB

Ok, a very first attempt, I need someone to review and provide the basic goals of the module. I'm not sure if the unblock action is a good example, the other two are fine for me if I was in position of learn how do actions work.

Descriptions are written more carefully than ever, to avoid the hard work of the review. The testcase is empty, as long as I'm not sure if these are the 'good' example actions it makes no sense to test them yet.

Anyway, the hook_action_info_alter() will not work, we will have to wait for the blocker in #3 to see how do we deal with it.

ilo’s picture

I've found 5 or 6 coder issues (identation with tabs) in this module (after submitting the patch), so probably the trigger_example also fails the same way (I used as the template).

rfay’s picture

Assigned: ilo » rfay

I'm doing a little cleanup on this and adding tests.

rfay’s picture

StatusFileSize
new26.81 KB

Added tests.

Removed hook_action_info_alter(), as it doesn't seem to actually work.

Bundles in a cheater change to trigger_example.test (some core changes went in that made it easy to improve).

Some minor comment changes.

rfay’s picture

Status: Needs review » Fixed

Committed: http://drupal.org/cvs?commit=463748

Thanks, ilo!

Status: Fixed » Closed (fixed)

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

ilo’s picture

Thanks for pushing this one, rfay!