You are here

function itoggle_views_handler_field::click_sort in iToggle 7.2

Same name and namespace in other branches
  1. 7 modules/views/itoggle_views_handler.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_field.inc, line 92
Views field handler for iToggle Views.

Class

itoggle_views_handler_field
A handler to provide a custom field for iToggle.

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);
  }
}