You are here

function hosting_server_handler_field_services::label in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 server/includes/views/handlers/hosting_server_handler_field_services.inc \hosting_server_handler_field_services::label()

Build a table header compiled from available services.

Overrides views_handler_field::label

File

server/includes/views/handlers/hosting_server_handler_field_services.inc, line 25
Definition of hosting_server_handler_field_services.

Class

hosting_server_handler_field_services
Field handler to show services running on servers.

Code

function label() {

  // Return a simple string for the Views_UI.
  if ($this->view->editing && is_null($this->original_value)) {
    return 'Services';
  }
  $services = hosting_server_services();
  foreach ($services as $name => $service) {
    $services[$name] = $service['title'];
  }
  return implode(',', $services);
}