You are here

function hosting_server_handler_field_services::render 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::render()

Build a list of services.

Overrides views_handler_field::render

File

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

Class

hosting_server_handler_field_services
Field handler to show services running on servers.

Code

function render($values) {
  $all_services = hosting_server_services();
  $types = array();
  foreach ($all_services as $type => $service) {
    $types[$type] = null;
  }
  $node = node_load($values->hosting_server_nid);
  foreach ($node->services as $type => $class) {
    $types[$type] = $class
      ->getName();
  }
  return implode(',', $types);
}