Issue #2830196 by Lendude: Click sorting EntityOperations field leads to an Exception being thrown

8.3.x
xjm 2016-11-26 15:09:20 -06:00
parent f08a8c8318
commit 6fe12176c4
3 changed files with 56 additions and 1 deletions

View File

@ -165,4 +165,11 @@ class EntityOperations extends FieldPluginBase {
return $this->view;
}
/**
* {@inheritdoc}
*/
public function clickSortable() {
return FALSE;
}
}

View File

@ -25,7 +25,7 @@ class FieldEntityOperationsTest extends HandlerTestBase {
*
* @var array
*/
public static $modules = array('node', 'language');
public static $modules = array('node', 'language', 'views_ui');
function setUp() {
parent::setUp();
@ -83,6 +83,11 @@ class FieldEntityOperationsTest extends HandlerTestBase {
}
}
}
// Test that we can't enable click sorting on the operation field.
$this->drupalGet('admin/structure/views/nojs/display/test_entity_operations/page_2/style_options');
$this->assertField('style_options[info][title][sortable]');
$this->assertNoField('style_options[info][operations][sortable]');
}
}

View File

@ -123,3 +123,46 @@ display:
position: null
display_options:
path: test-entity-operations
page_2:
display_plugin: page
id: page_2
display_title: 'Page 2'
position: null
display_options:
path: test-entity-operations-table
style:
type: table
options:
grouping: { }
row_class: ''
default_row_class: true
override: true
sticky: false
caption: ''
summary: ''
description: ''
columns:
title: title
operations: operations
info:
title:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
operations:
align: ''
separator: ''
empty_column: false
responsive: ''
default: '-1'
empty_table: false
row:
type: fields
options: { }
display_extenders: { }
defaults:
style: false
row: false