You are here

function message_handler_field_message_render::render in Message 7

Same name and namespace in other branches
  1. 6 includes/message_handler_field_message_render.inc \message_handler_field_message_render::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

includes/views/handlers/message_handler_field_message_render.inc, line 73
Contains the message field handler.

Class

message_handler_field_message_render
Views field handler for rendering a message.

Code

function render($values) {
  $field_alias = $this->field_alias;
  if (!empty($values->{$field_alias}) && ($message = message_load($values->{$field_alias}))) {
    $options = array(
      'field name' => $this->options['field_name'],
      'partials' => $this->options['partials'],
      'partial delta' => $this->options['partials_delta'],
    );
    return $message
      ->getText(NULL, $options);
  }
}