You are here

class twitter_views_handler_field_profile_image in Twitter 6.5

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

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

Hierarchy

Expanded class hierarchy of twitter_views_handler_field_profile_image

1 string reference to 'twitter_views_handler_field_profile_image'
twitter_views_data in ./twitter.views.inc
Implementation of hook_views_data()

File

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

View source
class twitter_views_handler_field_profile_image extends views_handler_field {
  function render($values) {
    $path = $values->{$this->field_alias};
    $output = theme('image', $path, '', '', array(
      'width' => 48,
      'height' => '48',
    ), FALSE);

    // 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);
  }

}

Members