You are here

bat_unit_handler_unit_type_field.inc in Booking and Availability Management Tools for Drupal 7

Contains a Views field handler to take care of displaying the correct label for unit bundles.

File

modules/bat_unit/views/bat_unit_handler_unit_type_field.inc
View source
<?php

/**
 * @file
 * Contains a Views field handler to take care of displaying the correct label
 * for unit bundles.
 */

/**
 *
 */
class bat_unit_handler_unit_bundle_field extends views_handler_field {

  /**
   * {@inheritdoc}
   */
  public function construct() {
    parent::construct();
  }

  /**
   * {@inheritdoc}
   */
  public function render($values) {
    $unit_bundle = bat_unit_bundle_load($this
      ->get_value($values));
    return $unit_bundle->label;
  }

}