function _hosting_get_clients in Hosting 7.3
Same name and namespace in other branches
- 5 client/hosting_client.module \_hosting_get_clients()
- 6.2 client/hosting_client.module \_hosting_get_clients()
- 7.4 client/hosting_client.module \_hosting_get_clients()
Get 25 clients in a paged query.
DEPRECATED, moved to the hosting_client_list view.
File
- client/
hosting_client.module, line 1063
Code
function _hosting_get_clients() {
$return = array();
$query = db_select('node', 'n')
->extend('PagerDefault');
$result = $query
->fields('n', array(
'nid',
'title',
))
->condition('type', 'client')
->limit(25)
->addTag('node_access')
->execute();
foreach ($result as $client) {
$return[$client->nid] = $client->title;
}
return $return;
}