diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php index 19fe3e1..c3f0c0d 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php @@ -223,7 +223,7 @@ function add_field_table($use_groupby) { /** * Determine if this field is click sortable. */ - function click_sortable() { + public function clickSortable() { // Not click sortable in any case. if (empty($this->definition['click sortable'])) { return FALSE; diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php index 618b6ae..2050e5e 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php @@ -78,9 +78,9 @@ public function query() { } /** - * Overrides \Drupal\views\Plugin\views\Plugin\field\FieldPluginBase::click_sortable(). + * Overrides \Drupal\views\Plugin\views\Plugin\field\FieldPluginBase::clickSortable(). */ - public function click_sortable() { + public function clickSortable() { return FALSE; } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php index bc8dfff..5bc3015 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php @@ -181,7 +181,7 @@ function click_sort($order) { * The value of 'click sortable' from the plugin definition, this defaults * to TRUE if not set. */ - function click_sortable() { + public function clickSortable() { return isset($this->definition['click sortable']) ? $this->definition['click sortable'] : TRUE; } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php index fa868c7..753b730 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php @@ -277,7 +277,7 @@ public function buildOptionsForm(&$form, &$form_state) { '#options' => $field_names, '#default_value' => $column, ); - if ($handlers[$field]->click_sortable()) { + if ($handlers[$field]->clickSortable()) { $form['info'][$field]['sortable'] = array( '#type' => 'checkbox', '#default_value' => !empty($this->options['info'][$field]['sortable']), diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php index d5f2eac..484d593 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php @@ -530,17 +530,17 @@ public function testClickSortable() { 'field' => 'name', ); $plugin = views_get_handler($item, 'field'); - $this->assertTrue($plugin->click_sortable(), 'TRUE as a default value is correct.'); + $this->assertTrue($plugin->clickSortable(), 'TRUE as a default value is correct.'); // Test that click_sortable is TRUE by when set TRUE in the data. $item['field'] = 'id'; $plugin = views_get_handler($item, 'field'); - $this->assertTrue($plugin->click_sortable(), 'TRUE as a views data value is correct.'); + $this->assertTrue($plugin->clickSortable(), 'TRUE as a views data value is correct.'); // Test that click_sortable is FALSE by when set FALSE in the data. $item['field'] = 'job'; $plugin = views_get_handler($item, 'field'); - $this->assertFalse($plugin->click_sortable(), 'FALSE as a views data value is correct.'); + $this->assertFalse($plugin->clickSortable(), 'FALSE as a views data value is correct.'); } /** diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 7b47475..1af0eb3 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -519,7 +519,7 @@ function template_preprocess_views_view_table(&$vars) { // render the header labels if ($field == $column && empty($fields[$field]->options['exclude'])) { $label = check_plain(!empty($fields[$field]) ? $fields[$field]->label() : ''); - if (empty($options['info'][$field]['sortable']) || !$fields[$field]->click_sortable()) { + if (empty($options['info'][$field]['sortable']) || !$fields[$field]->clickSortable()) { $vars['header'][$field] = $label; } else {