You are here

public function Node::getAvailableSorts in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node::getAvailableSorts()

Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::getAvailableSorts().

Return value

array An array whose keys are the available sort options and whose corresponding values are human readable labels.

Overrides WizardPluginBase::getAvailableSorts

File

core/modules/node/src/Plugin/views/wizard/Node.php, line 54
Contains \Drupal\node\Plugin\views\wizard\Node.

Class

Node
Tests creating node views with the wizard.

Namespace

Drupal\node\Plugin\views\wizard

Code

public function getAvailableSorts() {

  // You can't execute functions in properties, so override the method
  return array(
    'node_field_data-title:DESC' => $this
      ->t('Title'),
  );
}