function views_data_export_plugin_style_export::build_sort in Views data export 6.3
Same name and namespace in other branches
- 6 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::build_sort()
- 6.2 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::build_sort()
- 7.4 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::build_sort()
- 7 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::build_sort()
- 7.3 plugins/views_data_export_plugin_style_export.inc \views_data_export_plugin_style_export::build_sort()
File
- plugins/
views_data_export_plugin_style_export.inc, line 182 - Plugin include file for export style plugin.
Class
- views_data_export_plugin_style_export
- Generalized style plugin for export plugins.
Code
function build_sort() {
// Bypass doing any sort of testing if parent sorting is disabled.
if (!$this->options['parent_sort']) {
return parent::build_sort();
}
$displays = $this->display->handler
->get_option('displays');
// Here is later. We can get the passed argument and use it to know which
// display we can from and then do some addition processing.
// If the display exists and is attached these two tests will succeed.
if (isset($_GET['attach']) && isset($displays[$_GET['attach']]) && $displays[$_GET['attach']]) {
// Setup the second style we're going to be using to sort on.
$plugin_id = $displays[$_GET['attach']];
$parent_display = $this->view->display[$plugin_id];
$style_name = $parent_display->handler
->get_option('style_plugin');
$style_options = $parent_display->handler
->get_option('style_options');
$this->extra_style = views_get_plugin('style', $style_name);
$this->extra_style
->init($this->view, $parent_display, $style_options);
// Call the second styles sort funciton and return the value.
return $this->extra_style
->build_sort();
}
}