You are here

function views_handler_field_user_picture::element_type in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 modules/user/views_handler_field_user_picture.inc \views_handler_field_user_picture::element_type()
  2. 7.3 modules/user/views_handler_field_user_picture.inc \views_handler_field_user_picture::element_type()

Return an HTML element based upon the field's element type.

Overrides views_handler_field::element_type

File

modules/user/views_handler_field_user_picture.inc, line 16

Class

views_handler_field_user_picture
Field handler to provide simple renderer that allows using a themed user link.

Code

function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
  if ($inline) {
    return 'span';
  }
  if ($none_supported) {
    if ($this->options['element_type'] === '0') {
      return '';
    }
  }
  if ($this->options['element_type']) {
    return check_plain($this->options['element_type']);
  }
  if ($default_empty) {
    return '';
  }
  if (isset($this->definition['element type'])) {
    return $this->definition['element type'];
  }
  return 'div';
}