You are here

function sms_actions_command_list in SMS Framework 7

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

Menu callback: command listing.

Return value

string HTML string for the table of commands.

1 string reference to 'sms_actions_command_list'
sms_actions_menu in modules/sms_actions/sms_actions.module
Implementation of hook_menu().

File

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

Code

function sms_actions_command_list() {
  $header = array(
    t('Discriminator'),
    t('Operations'),
  );
  $commands = sms_actions_get_commands();
  $rows = array();
  foreach ($commands as $command) {
    $row = array(
      $command->discriminator,
      l(t('edit'), 'admin/smsframework/actions/edit/' . $command->discriminator),
    );
    $rows[] = $row;
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
    'empty' => t('No commands available.'),
  ));
}