public function Views_Merge_RowsDisplayExtenderPlugin::optionsSummary in Views Merge Rows 8
Provide the default summary for options in the views UI.
This output is returned as an array.
Overrides DisplayExtenderPluginBase::optionsSummary
File
- src/
Plugin/ views/ display_extender/ views_merge_rowsDisplayExtenderPlugin.php, line 98 - Contains the class to extend views display with rows merge functionality.
Class
- Views_Merge_RowsDisplayExtenderPlugin
- Plugin annotation @ViewsDisplayExtender( id = "views_merge_rows", title = @Translation("Merge rows"), help = @Translation("Merges rows with the same values in the specified fields."), no_ui = FALSE )
Namespace
Drupal\views_merge_rows\Plugin\views\display_extenderCode
public function optionsSummary(&$categories, &$options) {
if ($this->displayHandler
->usesFields()) {
$configuration = $this
->get_options();
$options['views_merge_rows'] = [
'category' => 'other',
'title' => t('Merge rows'),
'value' => $configuration['merge_rows'] ? t('Settings') : t('No'),
'desc' => t('Allow merging rows with the same content in the specified fields.'),
];
}
}