diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php index 618a3c2..980424c 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php @@ -21,7 +21,8 @@ * * @Block( * id = "aggregator_category_block", - * admin_label = @Translation("Aggregator category") + * admin_label = @Translation("Aggregator category"), + * category = @Translation("Lists (Views)") * ) */ class AggregatorCategoryBlock extends BlockBase implements ContainerFactoryPluginInterface { diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php index b5272e9..fa34b8a 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php @@ -21,7 +21,8 @@ * * @Block( * id = "aggregator_feed_block", - * admin_label = @Translation("Aggregator feed") + * admin_label = @Translation("Aggregator feed"), + * category = @Translation("Lists (Views)") * ) */ class AggregatorFeedBlock extends BlockBase implements ContainerFactoryPluginInterface { diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php index 7980f2d..def3fdf 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php @@ -21,6 +21,7 @@ * @Block( * id = "custom_block", * admin_label = @Translation("Custom block"), + * category = @Translation("Custom"), * derivative = "Drupal\custom_block\Plugin\Derivative\CustomBlock" * ) */ 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 06f860a..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 @@ -47,7 +47,7 @@ protected function defineOptions() { $options = parent::defineOptions(); $options['block_description'] = array('default' => '', 'translatable' => TRUE); - $options['block_category'] = array('default' => 'Views', 'translatable' => TRUE); + $options['block_category'] = array('default' => 'Lists (Views)', 'translatable' => TRUE); $options['block_caching'] = array('default' => DRUPAL_NO_CACHE); $options['block_hide_empty'] = array('default' => FALSE); @@ -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'], diff --git a/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php b/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php index d32ea7b..d250033 100644 --- a/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php +++ b/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php @@ -16,7 +16,8 @@ * * @Block( * id = "book_navigation", - * admin_label = @Translation("Book navigation") + * admin_label = @Translation("Book navigation"), + * category = @Translation("Menus") * ) */ class BookNavigationBlock extends BlockBase { diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php b/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php index 150d91a..9254744 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php @@ -17,7 +17,8 @@ * * @Block( * id = "recent_comments", - * admin_label = @Translation("Recent comments") + * admin_label = @Translation("Recent comments"), + * category = @Translation("Lists (Views)") * ) */ class RecentCommentsBlock extends BlockBase { diff --git a/core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php b/core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php index 769aeb7..3c7aa2a 100644 --- a/core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php +++ b/core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php @@ -15,7 +15,8 @@ * * @Block( * id = "forum_active_block", - * admin_label = @Translation("Active forum topics") + * admin_label = @Translation("Active forum topics"), + * category = @Translation("Lists (Views)") * ) */ class ActiveTopicsBlock extends ForumBlockBase { diff --git a/core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php b/core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php index 44622a1..43c0442 100644 --- a/core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php +++ b/core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php @@ -15,7 +15,8 @@ * * @Block( * id = "forum_new_block", - * admin_label = @Translation("New forum topics") + * admin_label = @Translation("New forum topics"), + * category = @Translation("Lists (Views)") * ) */ class NewTopicsBlock extends ForumBlockBase { diff --git a/core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php b/core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php index fab28d8..fae6081 100644 --- a/core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php +++ b/core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php @@ -18,6 +18,7 @@ * @Block( * id = "language_block", * admin_label = @Translation("Language switcher"), + * category = @Translation("System"), * derivative = "Drupal\language\Plugin\Derivative\LanguageBlock" * ) */ diff --git a/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php b/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php index 92a129d..d5db365 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php @@ -17,7 +17,8 @@ * * @Block( * id = "node_recent_block", - * admin_label = @Translation("Recent content") + * admin_label = @Translation("Recent content"), + * category = @Translation("Lists (Views)") * ) */ class RecentContentBlock extends BlockBase { diff --git a/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php b/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php index 04ed8b9..7bef9bd 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php @@ -17,7 +17,8 @@ * * @Block( * id = "node_syndicate_block", - * admin_label = @Translation("Syndicate") + * admin_label = @Translation("Syndicate"), + * category = @Translation("System") * ) */ class SyndicateBlock extends BlockBase { diff --git a/core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php b/core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php index 99643e2..aa33cbf 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php +++ b/core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php @@ -17,7 +17,8 @@ * * @Block( * id = "search_form_block", - * admin_label = @Translation("Search form") + * admin_label = @Translation("Search form"), + * category = @Translation("Forms") * ) */ class SearchBlock extends BlockBase { diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php index e6c9bb4..4a5efe2 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php @@ -15,8 +15,9 @@ * Provides a 'Shortcut' block. * * @Block( - * id = "shortcuts", - * admin_label = @Translation("Shortcuts") + * id = "shortcuts", + * admin_label = @Translation("Shortcuts"), + * category = @Translation("Menus") * ) */ class ShortcutsBlock extends BlockBase { diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php index c983672..394621c 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php @@ -18,7 +18,7 @@ * @Block( * id = "system_menu_block", * admin_label = @Translation("Menu"), - * category = @Translation("Menu"), + * category = @Translation("Menus"), * derivative = "Drupal\system\Plugin\Derivative\SystemMenuBlock" * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php b/core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php index c4f3c4f..c087889 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php @@ -15,7 +15,8 @@ * * @Block( * id = "user_login_block", - * admin_label = @Translation("User login") + * admin_label = @Translation("User login"), + * category = @Translation("Forms") * ) */ class UserLoginBlock extends BlockBase { diff --git a/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php b/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php index 5a63956..30b83c8 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php @@ -17,7 +17,8 @@ * * @Block( * id = "user_new_block", - * admin_label = @Translation("Who's new") + * admin_label = @Translation("Who's new"), + * category = @Translation("Lists (Views)") * ) */ class UserNewBlock extends BlockBase { diff --git a/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php b/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php index d3e26b8..9a647a5 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php @@ -20,7 +20,8 @@ * * @Block( * id = "user_online_block", - * admin_label = @Translation("Who's online") + * admin_label = @Translation("Who's online"), + * category = @Translation("Lists (Views)") * ) */ class UserOnlineBlock extends BlockBase {