protected function WizardPluginBase::defaultDisplaySorts in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::defaultDisplaySorts()
Retrieves all sort information used by the default display.
Additional to the one provided by the plugin this method takes care about adding additional sorts based on user input.
Parameters
array $form: The full wizard form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the wizard form.
Return value
array An array of sort arrays keyed by ID. A sort array contains the options accepted by a sort handler.
1 call to WizardPluginBase::defaultDisplaySorts()
- WizardPluginBase::buildDisplayOptions in core/
modules/ views/ src/ Plugin/ views/ wizard/ WizardPluginBase.php - Builds an array of display options for the view.
File
- core/
modules/ views/ src/ Plugin/ views/ wizard/ WizardPluginBase.php, line 950 - Contains \Drupal\views\Plugin\views\wizard\WizardPluginBase.
Class
- WizardPluginBase
- Base class for Views wizard plugins.
Namespace
Drupal\views\Plugin\views\wizardCode
protected function defaultDisplaySorts($form, FormStateInterface $form_state) {
$sorts = array();
// Add any sorts provided by the plugin.
foreach ($this
->getSorts() as $name => $info) {
$sorts[$name] = $info;
}
// Add any sorts specified by the user when filling out the wizard.
$sorts = array_merge($sorts, $this
->defaultDisplaySortsUser($form, $form_state));
return $sorts;
}