function clients_resources in Web Service Clients 7
Same name and namespace in other branches
- 6 clients.module \clients_resources()
2 string references to 'clients_resources'
- clients_menu in ./
clients.module - Implementation of hook_menu()
- clients_resources_form_submit in ./
clients.module
File
- ./
clients.module, line 483 - Clients module - handles keys and service connections and provides an API for clients
Code
function clients_resources() {
$sources = array();
foreach (clients_resources_load() as $resource_id => $resource) {
$connection = clients_connection_load($resource['connection']);
$resources[] = array(
'name' => l($resource['name'], 'admin/settings/clients/resources/' . $resource_id),
'connection' => $connection->type . ': ' . $connection->name,
'operations' => l(t('Edit'), 'admin/settings/clients/resources/' . $resource_id . '/edit') . ' | ' . l(t('Delete'), 'admin/settings/clients/resources/' . $resource_id . '/delete'),
);
}
if (!count($resources)) {
$resources[] = array(
array(
'data' => t('No resources defined yet.'),
'colspan' => '3',
),
);
}
return theme_table(array(
'Name',
'Connection',
'Operations',
), $resources);
}