public function Ingredient::getAvailableSorts in Recipe 8.2
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
- modules/
ingredient/ src/ Plugin/ views/ wizard/ Ingredient.php, line 33
Class
- Ingredient
- Wizard plugin for creating Ingredient views.
Namespace
Drupal\ingredient\Plugin\views\wizardCode
public function getAvailableSorts() {
// You can't execute functions in properties, so override the method.
return [
'ingredient_field_data-name:ASC' => $this
->t('Name'),
];
}