function sms_actions_command_list in SMS Framework 6
Same name and namespace in other branches
- 6.2 modules/sms_actions/sms_actions.module \sms_actions_command_list()
- 7 modules/sms_actions/sms_actions.module \sms_actions_command_list()
Menu callback: command listing
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 342 - 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();
if (!empty($commands)) {
foreach ($commands as $command) {
$row = array(
$command->discriminator,
l(t('edit'), 'admin/smsframework/actions/edit/' . $command->discriminator),
);
$rows[] = $row;
}
}
else {
$rows[] = array(
array(
'data' => t('No commands available.'),
'colspan' => 2,
),
);
}
return theme('table', $header, $rows);
}