public function state_flow_entity_handler_field_state::render in State Machine 7.3
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- modules/
state_flow_entity/ includes/ views/ state_flow_entity_handler_field_state.inc, line 14 - Field handler for states. Takes state machine name columns and renders the labels.
Class
- state_flow_entity_handler_field_state
- @file Field handler for states. Takes state machine name columns and renders the labels.
Code
public function render($values) {
$return = '';
$value = $this
->get_value($values);
if (!empty($value)) {
$state_labels = state_flow_entity_state_labels();
if (!empty($state_labels[$value])) {
// @todo, check_plain might not be necessary as escaping could happen
// later. Until I know otherwise, I'll stay on the safe side.
$return = check_plain($state_labels[$value]);
}
}
return $return;
}