function views_handler_field_node_gathercontent_status::render in GatherContent 7.3
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- views/
handlers/ views_handler_field_node_gathercontent_status.inc, line 18
Class
- views_handler_field_node_gathercontent_status
- Field handler to present a link to delete a mytype record.
Code
function render($values) {
$gathercontent_id = isset($values->{$this->aliases['gathercontent_id']}) ? $values->{$this->aliases['gathercontent_id']} : NULL;
if (isset($this->contents[$gathercontent_id]['status'])) {
return '<div style="width:20px; height: 20px; float: left; margin-right: 5px; background: ' . $this->contents[$gathercontent_id]['status']->data->color . ';"></div>' . $this->contents[$gathercontent_id]['status']->data->name;
}
else {
return t('Not accessible');
}
}