You are here

function twitter_views_handler_field_profile_image::render in Twitter 7.5

Same name and namespace in other branches
  1. 6.5 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()
  2. 6.2 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()
  3. 6.3 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()
  4. 6.4 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()
  5. 7.6 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()
  6. 7.3 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()
  7. 7.4 twitter_views_field_handlers.inc \twitter_views_handler_field_profile_image::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

./twitter_views_field_handlers.inc, line 77
Views handlers for Twitter module.

Class

twitter_views_handler_field_profile_image
Field handler to provide simple renderer that turns a URL into a clickable link.

Code

function render($values) {
  $value = $values->{$this->field_alias};
  $output = theme('image', array(
    'path' => $value,
    'width' => 48,
    'height' => 48,
  ));

  // Convert to a protocol-relative URL so that the same image tag will work
  // regardless of whether the page is loaded via HTTP or HTTPS.
  return str_replace('http:', '', $output);
}