You are here

public function role_watchdog_handler_field_action::render in Role Watchdog 7.2

Transform the binary action to human readable text.

Overrides views_handler_field::render

File

./role_watchdog.views.inc, line 146
Role Watchdog Views hooks.

Class

role_watchdog_handler_field_action
Field action handler.

Code

public function render($values) {
  $action = $values->role_watchdog_action;
  if (isset($action)) {
    $action_value = '';
    switch ($action) {
      case 0:
        $action_value = t('removed by');
        break;
      case 1:
        $action_value = t('added by');
        break;
    }
    return $action_value;
  }
}