You are here

function trigger_example_help in Examples for Developers 7

Same name and namespace in other branches
  1. 6 trigger_example/trigger_example.module \trigger_example_help()

Implements hook_help().

Related topics

File

trigger_example/trigger_example.module, line 228
Trigger definition example module.

Code

function trigger_example_help($path, $arg) {
  switch ($path) {
    case 'examples/trigger_example':
      $explanation = t('Click the button on this page to call trigger_example_triggersomething()
        and fire the triggersomething event. First, you need to create an action
        and assign it to the "After the triggersomething button is clicked" trigger,
        or nothing will happen.  Use the <a href="@actions-url">Actions settings page</a>
        and assign these actions to the triggersomething event on the
        <a href="@triggers-url">Triggers settings page</a>. <br/><br/>
        The other example is the "user never logged in before" example. For that one,
        assign an action to the "After a user has logged in for the first time" trigger
        and then log a user in.', array(
        '@actions-url' => url('admin/config/system/actions'),
        '@triggers-url' => url('admin/structure/trigger/trigger_example'),
      ));
      return "<p>{$explanation}</p>";
    case 'admin/structure/trigger/system':
      return t('you can assign actions to run everytime an email is sent by Drupal');
    case 'admin/structure/trigger/trigger_example':
      $explanation = t("A trigger is a system event. For the trigger example, it's just a button-press.\n        To demonstrate the trigger example, choose to associate the 'display a message to the user'\n        action with the 'after the triggersomething button is pressed' trigger.");
      return "<p>{$explanation}</p>";
  }
}