You are here

views_handler_field_user_relationships_oneway.inc in User Relationships 7

User Relationships Views integration. Map type column to a text label

File

user_relationship_views/views_handler_field_user_relationships_oneway.inc
View source
<?php

/**
 * @file
 * User Relationships Views integration.
 * Map type column to a text label
 */
class views_handler_field_user_relationships_oneway extends views_handler_field {
  function construct() {
    parent::construct();
    $this->status_map = array(
      '0' => t('mutual'),
      '1' => t('one way'),
    );
  }
  function render($values) {
    return $this->status_map[$values->{$this->field_alias}];
  }

}

Classes

Namesort descending Description
views_handler_field_user_relationships_oneway @file User Relationships Views integration. Map type column to a text label