function commerce_file_handler_field_license_limit::render in Commerce File 7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides commerce_file_handler_field_license_property::render
File
- views/
handlers/ commerce_file_handler_field_license_limit.inc, line 13 - Field handler for a license limit.
Class
- commerce_file_handler_field_license_limit
- Field handler for license expiration.
Code
function render($values) {
$entity = $this
->_get_entity($values);
if (!empty($entity)) {
$limits = $entity->limits;
if (!empty($limits)) {
if (!isset($limits[$this->real_field]) || $entity
->check_limit_is_unlimited($limits[$this->real_field])) {
$value = !empty($this->options['unlimited_text']) ? $this->options['unlimited_text'] : NULL;
}
else {
$value = $limits[$this->real_field];
}
return $this
->sanitize_value($value);
}
}
}