function ArgumentPluginBase::summarySort

Same name and namespace in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summarySort()
  2. 10 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summarySort()
  3. 11.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summarySort()

Sorts the summary based upon the user's selection.

The base variant of this is usually adequate.

Parameters

$order: The order selected in the UI.

string|null $by: (optional) This parameter sets the direction for which to order. Defaults to NULL.

1 call to ArgumentPluginBase::summarySort()
ArgumentPluginBase::defaultSummary in core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
Default action: summary.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 939

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

public function summarySort($order, $by = NULL) {
    $this->query
        ->addOrderBy(NULL, NULL, $order, !empty($by) ? $by : $this->name_alias);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.