You are here

function word_link_handler_word_link_visibility::render in Word Link 7.2

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

handlers/word_link_handler_word_link_visibility.inc, line 29
Definition of word_link_handler_word_link_visibility.

Class

word_link_handler_word_link_visibility
Field handler to present a word link visibility.

Code

function render($values) {
  $output = NULL;
  $visibility = $this
    ->get_value($values, 'visibility');
  $except = $this
    ->get_value($values, 'except_list');
  if (!empty($except)) {
    $visibility = $visibility ? t('Only on') . ': ' : t('Except') . ': ';
    $output = $visibility . str_replace(array(
      "\r\n",
      "\n",
      "\r",
    ), " | ", check_plain(trim($except)));
  }
  return $output;
}