You are here

function pm_handler_field_attributes_domain::render in Drupal PM (Project Management) 7

Alters views render to show attribute values rather than keys.

Overrides views_handler_field::render

File

./pm_handler_field_attributes_domain.inc, line 11
Views handler to show attribute values rather than keys in views.

Class

pm_handler_field_attributes_domain
@file Views handler to show attribute values rather than keys in views.

Code

function render($values) {
  $key = $values->{$this->field_alias};
  $value = pm_attribute_value($this->definition['domain'], $key);
  if (!empty($this->definition['icon'])) {
    return pm_icon($this->definition['icon'] . '_' . $key, $value);
  }
  return check_plain($value);
}