hosting_server_handler_field_human_name.inc

Classes

Namesort descending Description
hosting_server_handler_field_human_name A handler for the Site status field.

File

server/includes/views/handlers/hosting_server_handler_field_human_name.inc
View source
  1. <?php
  2. /**
  3. * A handler for the Site status field.
  4. *
  5. * @ingroup views_field_handlers
  6. */
  7. class hosting_server_handler_field_human_name extends views_handler_field {
  8. /**
  9. * Constructor; calls to base object constructor.
  10. */
  11. function construct() {
  12. parent::construct();
  13. $this->additional_fields['title'] = array('table' => 'node', 'field' => 'title');
  14. }
  15. function render($values) {
  16. // Default to the hostname if the human-readable name isn't set.
  17. $value = $values->{$this->field_alias} ? $values->{$this->field_alias} : $values->{$this->aliases['title']};
  18. return $value;
  19. }
  20. }