function IndexTidDepth::defaultActions

Same name in other branches
  1. 9 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::defaultActions()
  2. 10 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::defaultActions()
  3. 11.x core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::defaultActions()

Override defaultActions() to remove summary actions.

Overrides ArgumentPluginBase::defaultActions

File

core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php, line 82

Class

IndexTidDepth
Argument handler for taxonomy terms with depth.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

protected function defaultActions($which = NULL) {
    if ($which) {
        if (in_array($which, [
            'ignore',
            'not found',
            'empty',
            'default',
        ])) {
            return parent::defaultActions($which);
        }
        return;
    }
    $actions = parent::defaultActions();
    unset($actions['summary asc']);
    unset($actions['summary desc']);
    unset($actions['summary asc by count']);
    unset($actions['summary desc by count']);
    return $actions;
}

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