spaces_handler_field_spaces_feature.inc in Spaces 6
File
includes/spaces_handler_field_spaces_feature.inc
View source
<?php
class spaces_handler_field_spaces_feature extends views_handler_field_node_type {
function render($values) {
static $map;
static $features;
if (!isset($map)) {
$map = spaces_content_types();
$features = spaces_features();
}
$output = '';
if (isset($map[$values->{$this->field_alias}])) {
$feature = $map[$values->{$this->field_alias}];
$label = $features[$feature]->spaces['label'];
$output = "<span class='spaces-feature feature-{$feature}'>{$label}</span>";
}
return $output;
}
}