function Node::getAvailableSorts
Same name in other branches
- 9 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node::getAvailableSorts()
- 8.9.x core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node::getAvailableSorts()
- 10 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 98
Class
- Node
- Tests creating node views with the wizard.
Namespace
Drupal\node\Plugin\views\wizardCode
public function getAvailableSorts() {
// You can't execute functions in properties, so override the method
return [
'node_field_data-title:ASC' => $this->t('Title'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.