You are here

function itoggle_views_handler_field::click_sort in iToggle 7

Same name and namespace in other branches
  1. 7.2 modules/views/itoggle_views_handler_field.inc \itoggle_views_handler_field::click_sort()

Called to determine what to tell the clicksorter.

Overrides views_handler_field::click_sort

File

modules/views/itoggle_views_handler.inc, line 74
View handler for iToggle Views

Class

itoggle_views_handler_field
A handler to provide a custom field

Code

function click_sort($order) {
  $property = $this->_itoggle['property'];
  if (isset($this->field_alias)) {

    // Since fields should always have themselves already added, just
    // add a sort on the field.
    $params = $this->options['group_type'] != 'group' ? array(
      'function' => $this->options['group_type'],
    ) : array();
    $this->query
      ->add_orderby(NULL, NULL, $order, $property, $params);
  }
}