views_handler_field_user_relationships_status.inc in User Relationships 7
Same filename and directory in other branches
User Relationships Views integration. Map approved column to a text label
File
user_relationship_views/views_handler_field_user_relationships_status.incView source
<?php
/**
* @file
* User Relationships Views integration.
* Map approved column to a text label
*/
class views_handler_field_user_relationships_status extends views_handler_field {
function construct() {
parent::construct();
$this->status_map = array(
'0' => t('pending'),
'1' => t('approved'),
);
}
function render($values) {
return isset($this->status_map[$values->{$this->table . '_approved'}]) ? $this->status_map[$values->{$this->table . '_approved'}] : t('unknown');
}
}
Classes
Name![]() |
Description |
---|---|
views_handler_field_user_relationships_status | @file User Relationships Views integration. Map approved column to a text label |