You are here

function revisioning_trigger_info in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning_triggers_actions.inc \revisioning_trigger_info()

Implements hook_triggr_info().

Defines triggers available in this module.

File

./revisioning_triggers_actions.inc, line 13
Triggers and actions supported by the Revisioning module.

Code

function revisioning_trigger_info() {
  $trigger_info = array(
    // First key is the group, which must be an existing module name.
    // This will be the name on the tab on the admin/structure/trigger page.
    // We could use 'node', which means that these triggers will apprear under
    // the node tab, /admin/structure/trigger/node
    // Second key has no functional meaning as the actual invocation of the
    // trigger is in code, typically via module_invoke_all('some_op', $node);
    // For clarity we have chosen the names below to equal 'some_op'.
    // Revisioning's implementations of hook_some_op are further down in this
    // file.
    'revisioning' => array(
      // Or 'node'.
      'revision_publish' => array(
        'label' => t('When publishing a pending revision'),
      ),
      'revision_unpublish' => array(
        'label' => t('When unpublishing the current revision'),
      ),
      'revision_revert' => array(
        'label' => t('When reverting to an archived revision'),
      ),
    ),
  );
  return $trigger_info;
}