You are here

class views_handler_field_system_info_features in Views System 6.3

Same name and namespace in other branches
  1. 6.2 views/handlers/views_handler_field_system_info_features.inc \views_handler_field_system_info_features
  2. 7.3 views/handlers/views_handler_field_system_info_features.inc \views_handler_field_system_info_features

Provides display options and renders the features field of the system item.

Hierarchy

Expanded class hierarchy of views_handler_field_system_info_features

1 string reference to 'views_handler_field_system_info_features'
views_system_views_data_alter in views/views_system.views.inc
Implementation of hook_views_data_alter().

File

views/handlers/views_handler_field_system_info_features.inc, line 14
Views field handler for the views_system module.

View source
class views_handler_field_system_info_features extends views_handler_field_prerender_list {
  function pre_render($values) {
    foreach ($values as $value) {
      $info = unserialize($value->{$this->field_alias});
      if (isset($info['features'])) {
        $field = $value->{$this->field_alias};
        $this->items[$field] = array();
        foreach ($info['features'] as $feature) {
          $this->items[$field][] = array(
            'feature' => $feature,
          );
        }
      }
    }
  }
  function render_item($count, $item) {
    return $item['feature'];
  }
  function document_self_tokens(&$tokens) {
    $tokens['[' . $this->options['id'] . '-feature' . ']'] = t('The feature of the item.');
  }
  function add_self_tokens(&$tokens, $item) {
    $tokens['[' . $this->options['id'] . '-feature' . ']'] = $item['feature'];
  }

}

Members