You are here

class views_handler_field_system_drupal_core in Views System 6.3

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

Renders the Drupal core field of the system item.

Hierarchy

Expanded class hierarchy of views_handler_field_system_drupal_core

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

File

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

View source
class views_handler_field_system_drupal_core extends views_handler_field_boolean {
  function render($values) {
    $value = _views_system_get_drupal_core($values->{$this->field_alias});
    if (!empty($this->options['not'])) {
      $value = !$value;
    }
    if (isset($this->formats[$this->options['type']])) {
      $output = $value ? $this->formats[$this->options['type']][0] : $this->formats[$this->options['type']][1];
    }
    else {
      $output = $value ? $this->formats['yes-no'][0] : $this->formats['yes-no'][1];
    }
    return $output;
  }

}

Members