You are here

function library_handler_field_quantity::render in Library 6

Same name and namespace in other branches
  1. 6.2 includes/views/handlers/library_handler_field_quantity.inc \library_handler_field_quantity::render()
  2. 7 includes/views/handlers/library_handler_field_quantity.inc \library_handler_field_quantity::render()

File

includes/views/handlers/library_handler_field_quantity.inc, line 17

Class

library_handler_field_quantity
Display the library quantity

Code

function render($values) {
  $nid = $values->{$this->aliases['nid']};
  $node = node_load($nid);
  if (isset($node->items) && !empty($node->items)) {
    return count($node->items);
  }
  return '';
}