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 77927e7..05cd6b7 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 @@ -231,7 +231,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..b0299fc 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(). + * {@inheritdoc} */ - 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 328bbfa..606f064 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 @@ public function clickSort($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 490cdbb..a3621ef 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 4687e26..14e9197 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php @@ -524,23 +524,23 @@ function testIsValueEmpty() { * Tests whether the filters are click sortable as expected. */ public function testClickSortable() { - // Test that click_sortable is TRUE by default. + // Test that clickSortable is TRUE by default. $item = array( 'table' => 'views_test_data', '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. + // Test that clickSortable 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. + // Test that clickSortable 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 9afee40..0d2591a 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -575,7 +575,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 {