diff --git a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php index 34cd8c3..2f2eaac 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php @@ -365,17 +365,6 @@ public function usesExposed() { } /** - * {@inheritdoc} - */ - public function newDisplay() { - $base_tables = Views::viewsData()->fetchBaseTables(); - $base_table = $this->view->storage->get('base_table'); - if (isset($base_tables[$base_table]['title'])) { - $this->setOption('block_category', $base_tables[$base_table]['title']); - } - } - - /** * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::remove(). */ public function remove() { diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php index d759c57..d7e87f8 100644 --- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php @@ -66,7 +66,7 @@ public function testBlockCategory() { // Test that the block was given a default category corresponding to its // base table. $arguments = array( - ':id' => 'edit-category-views-test-data', + ':id' => 'edit-category-lists-views', ':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-1', ':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_1/stark'), ':text' => $edit['label'], @@ -81,7 +81,7 @@ public function testBlockCategory() { // Change the block category to a random string. $this->drupalGet('admin/structure/views/view/' . $edit['id'] . '/edit/block_1'); - $label = t('Views test data'); + $label = t('Lists (Views)'); $link = $this->xpath('//a[@id="views-block-1-block-category" and normalize-space(text())=:label]', array(':label' => $label)); $this->assertTrue(!empty($link)); $this->clickLink($label); @@ -102,7 +102,7 @@ public function testBlockCategory() { $this->assertTrue(!empty($elements), 'The test block appears in the custom category.'); $arguments = array( - ':id' => 'edit-category-views-test-data', + ':id' => 'edit-category-lists-views', ':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-2', ':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_2/stark'), ':text' => $edit['label'],