You are here

function views_handler_field_bean_type::render in Bean (for Drupal 7) 7

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

views/views_handler_field_bean_type.inc, line 14
Field handler to present a type of bean.

Class

views_handler_field_bean_type
@file Field handler to present a type of bean.

Code

function render($values) {
  if (!empty($values->bean_type)) {
    $types = bean_get_types();
    if (!empty($types[$values->bean_type])) {
      return $types[$values->bean_type]
        ->getLabel();
    }
  }
  return '';
}