You are here

function sms_actions_get_commands in SMS Framework 7

Same name and namespace in other branches
  1. 6.2 modules/sms_actions/sms_actions.module \sms_actions_get_commands()
  2. 6 modules/sms_actions/sms_actions.module \sms_actions_get_commands()

Returns an array of commands objects.

Command objects are created in the UI.

Return value

array The list of commands that have been created by the UI.

5 calls to sms_actions_get_commands()
sms_actions_action_info_alter in modules/sms_actions/sms_actions.module
Implements hook_action_info_alter().
sms_actions_command_list in modules/sms_actions/sms_actions.module
Menu callback: command listing.
sms_actions_command_save in modules/sms_actions/sms_actions.module
Saves a command.
sms_actions_sms_incoming in modules/sms_actions/sms_actions.module
Implementation of hook_sms_incoming().
sms_actions_trigger_info in modules/sms_actions/sms_actions.module
Implementation of hook_trigger_info().

File

modules/sms_actions/sms_actions.module, line 336
Provides a "Send SMS" action and the ability to define custom triggers for incoming messages.

Code

function sms_actions_get_commands() {
  $commands = variable_get('sms_actions_commands', array());
  foreach ($commands as $key => $command) {
    $commands[$key]->hook = 'sms_actions_' . $command->discriminator;
  }
  return $commands;
}