You are here

function clients_resources in Web Service Clients 6

Same name and namespace in other branches
  1. 7 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 448
Clients module - handles keys and service connections and provides an API for clients @author Django Beatty - adub

Code

function clients_resources() {
  $sources = array();
  foreach (clients_resources_load() as $resource_id => $resource) {
    $connection = clients_connection_load((int) $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);
}