function mp3player_player_list in MP3 Player 6.2
Same name and namespace in other branches
- 6 mp3player.module \mp3player_player_list()
- 7.2 mp3player.module \mp3player_player_list()
Return formatted list of mp3 players.
1 string reference to 'mp3player_player_list'
- mp3player_menu in ./
mp3player.module - Implementation of hook_menu().
File
- ./
mp3player.module, line 85 - mp3player main module file.
Code
function mp3player_player_list() {
$header = array(
t('Player Name'),
t('Actions'),
);
$rows = array();
$players = mp3player_players();
foreach (mp3player_players() as $pid => $player) {
$row = array();
$row[] = l($player['name'], 'admin/settings/mp3player/player/' . $player['pid']);
$links = array();
$links[] = l(t('Edit'), 'admin/settings/mp3player/player/' . $player['pid']);
if ($pid > 1) {
$links[] = l(t('Delete'), 'admin/settings/mp3player/player/' . $player['pid'] . '/delete');
}
$row[] = implode(' ', $links);
$rows[] = $row;
}
$output = theme('table', $header, $rows);
return $output;
}