You are here

function _authcache_p13n_admin_format_clients in Authenticated User Page Caching (Authcache) 7.2

Given a client-array, return an ordered list of client names.

1 call to _authcache_p13n_admin_format_clients()
authcache_p13n_admin_markup_configs in modules/authcache_p13n/authcache_p13n.admin.inc
Display a list of markup substitution configurations.

File

modules/authcache_p13n/authcache_p13n.admin.inc, line 219
Administrative interface for the authcache personalization module.

Code

function _authcache_p13n_admin_format_clients($config_clients = NULL) {
  $client_info = authcache_p13n_client_info();
  if (isset($config_clients)) {
    uasort($config_clients, 'drupal_sort_weight');
  }
  else {

    // Use original ordered client list by default.
    $config_clients = $client_info;
  }
  $client_names = array();
  foreach ($config_clients as $key => $config_client) {
    if (!empty($client_info[$key]['title']) && (!isset($config_client['status']) || !empty($config_client['status']))) {
      $client_names[] = $client_info[$key]['title'];
    }
  }
  return $client_names;
}