From c6b2c725e7842a7212e0a92bca6adcf44da2cd3f Mon Sep 17 00:00:00 2001 From: webchick Date: Mon, 4 Mar 2013 21:25:53 -0500 Subject: [PATCH] =?UTF-8?q?Issue=20#1591806=20by=20tim.plunkett,=20ryaniss?= =?UTF-8?q?amson,=20jenlampton,=20Risse,=20psynaptic,=20G=C3=A1bor=20Hojts?= =?UTF-8?q?y,=20kmcculloch,=20pakmanlh,=20Rob=20Loach:=20Change=20block=20?= =?UTF-8?q?'subject'=20so=20that=20it's=20called=20(admin=5F)label=20like?= =?UTF-8?q?=20everything=20else=20on=20the=20theme=20layer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Plugin/Derivative/AggregatorCategoryBlock.php | 4 ++-- .../aggregator/Plugin/Derivative/AggregatorFeedBlock.php | 4 ++-- .../Plugin/block/block/AggregatorCategoryBlock.php | 2 +- .../aggregator/Plugin/block/block/AggregatorFeedBlock.php | 2 +- core/modules/block/block.admin.inc | 2 +- core/modules/block/block.module | 2 +- .../Drupal/custom_block/Plugin/Derivative/CustomBlock.php | 2 +- .../custom_block/Plugin/block/block/CustomBlockBlock.php | 2 +- core/modules/block/lib/Drupal/block/BlockBase.php | 7 +++---- .../modules/block/lib/Drupal/block/BlockListController.php | 6 +++--- .../block/lib/Drupal/block/BlockRenderController.php | 2 +- .../Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php | 4 ++-- .../block/lib/Drupal/block/Tests/BlockStorageUnitTest.php | 2 +- core/modules/block/templates/block.tpl.php | 6 +++--- .../block/tests/config/block.block.stark.test_block.yml | 2 +- .../block_test/Plugin/block/block/TestCacheBlock.php | 2 +- .../block_test/Plugin/block/block/TestHtmlIdBlock.php | 2 +- .../block_test/Plugin/block/block/TestXSSTitleBlock.php | 2 +- .../Drupal/book/Plugin/block/block/BookNavigationBlock.php | 2 +- .../comment/Plugin/block/block/RecentCommentsBlock.php | 2 +- .../Drupal/forum/Plugin/block/block/ActiveTopicsBlock.php | 2 +- .../lib/Drupal/forum/Plugin/block/block/NewTopicsBlock.php | 2 +- .../Drupal/language/Plugin/Derivative/LanguageBlock.php | 2 +- .../Drupal/language/Plugin/block/block/LanguageBlock.php | 2 +- .../menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php | 2 +- .../menu/lib/Drupal/menu/Plugin/block/block/MenuBlock.php | 2 +- .../Drupal/node/Plugin/block/block/RecentContentBlock.php | 2 +- .../lib/Drupal/node/Plugin/block/block/SyndicateBlock.php | 2 +- .../lib/Drupal/search/Plugin/block/block/SearchBlock.php | 2 +- .../Drupal/shortcut/Plugin/block/block/ShortcutsBlock.php | 2 +- .../Plugin/block/block/StatisticsPopularBlock.php | 2 +- .../Drupal/system/Plugin/Derivative/SystemMenuBlock.php | 2 +- .../Drupal/system/Plugin/block/block/SystemHelpBlock.php | 2 +- .../Drupal/system/Plugin/block/block/SystemMainBlock.php | 2 +- .../Drupal/system/Plugin/block/block/SystemMenuBlock.php | 2 +- .../system/Plugin/block/block/SystemPoweredByBlock.php | 2 +- .../lib/Drupal/user/Plugin/block/block/UserLoginBlock.php | 2 +- .../lib/Drupal/user/Plugin/block/block/UserNewBlock.php | 2 +- .../lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php | 2 +- .../lib/Drupal/views/Plugin/Derivative/ViewsBlock.php | 2 +- .../views/Plugin/Derivative/ViewsExposedFilterBlock.php | 2 +- .../lib/Drupal/views/Plugin/block/block/ViewsBlock.php | 2 +- .../views/Plugin/block/block/ViewsExposedFilterBlock.php | 2 +- 43 files changed, 52 insertions(+), 53 deletions(-) diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorCategoryBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorCategoryBlock.php index 6535814d9c9..8b3c616c5e4 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorCategoryBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorCategoryBlock.php @@ -33,7 +33,7 @@ class AggregatorCategoryBlock implements DerivativeInterface { $result = db_query('SELECT cid, title FROM {aggregator_category} ORDER BY title WHERE cid = :cid', array(':cid' => $derivative_id))->fetchObject(); $this->derivatives[$derivative_id] = $base_plugin_definition; $this->derivatives[$derivative_id]['delta'] = $result->cid; - $this->derivatives[$derivative_id]['subject'] = t('@title category latest items', array('@title' => $result->title)); + $this->derivatives[$derivative_id]['admin_label'] = t('@title category latest items', array('@title' => $result->title)); return $this->derivatives[$derivative_id]; } @@ -46,7 +46,7 @@ class AggregatorCategoryBlock implements DerivativeInterface { foreach ($result as $category) { $this->derivatives[$category->cid] = $base_plugin_definition; $this->derivatives[$category->cid]['delta'] = $category->cid; - $this->derivatives[$category->cid]['subject'] = t('@title category latest items', array('@title' => $category->title)); + $this->derivatives[$category->cid]['admin_label'] = t('@title category latest items', array('@title' => $category->title)); } return $this->derivatives; } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php index 88da3861270..663bf5fce87 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Derivative/AggregatorFeedBlock.php @@ -33,7 +33,7 @@ class AggregatorFeedBlock implements DerivativeInterface { $result = db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid', array(':fid' => $derivative_id))->fetchObject(); $this->derivatives[$derivative_id] = $base_plugin_definition; $this->derivatives[$derivative_id]['delta'] = $result->fid; - $this->derivatives[$derivative_id]['subject'] = t('@title feed latest items', array('@title' => $result->title)); + $this->derivatives[$derivative_id]['admin_label'] = t('@title feed latest items', array('@title' => $result->title)); return $this->derivatives[$derivative_id]; } @@ -46,7 +46,7 @@ class AggregatorFeedBlock implements DerivativeInterface { foreach ($result as $feed) { $this->derivatives[$feed->fid] = $base_plugin_definition; $this->derivatives[$feed->fid]['delta'] = $feed->fid; - $this->derivatives[$feed->fid]['subject'] = t('@title feed latest items', array('@title' => $feed->title)); + $this->derivatives[$feed->fid]['admin_label'] = t('@title feed latest items', array('@title' => $feed->title)); } return $this->derivatives; } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorCategoryBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorCategoryBlock.php index 2f172161b8b..dde835de22c 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorCategoryBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorCategoryBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "aggregator_category_block", - * subject = @Translation("Aggregator category"), + * admin_label = @Translation("Aggregator category"), * module = "aggregator", * derivative = "Drupal\aggregator\Plugin\Derivative\AggregatorCategoryBlock" * ) diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorFeedBlock.php index e5d125d4850..f9aa6c49b36 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorFeedBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/block/block/AggregatorFeedBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "aggregator_feed_block", - * subject = @Translation("Aggregator feed"), + * admin_label = @Translation("Aggregator feed"), * module = "aggregator", * derivative = "Drupal\aggregator\Plugin\Derivative\AggregatorFeedBlock" * ) diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc index eab2d8d0b96..18b9c767880 100644 --- a/core/modules/block/block.admin.inc +++ b/core/modules/block/block.admin.inc @@ -77,7 +77,7 @@ function block_admin_edit(Block $entity) { $theme_title = t('!theme (administration theme)', array('!theme' => $theme_title)); } - // Get the block subject for the page title. + // Get the block label for the page title. drupal_set_title(t("Configure %label block in %theme", array('%label' => $entity->label(), '%theme' => $theme_title)), PASS_THROUGH); return entity_get_form($entity); diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 97ad2d25ed0..18b9d270519 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -477,7 +477,7 @@ function block_load($entity_id) { } /** - * Builds the content and subject for a block. + * Builds the content and label for a block. * * For cacheable blocks, this is called during #pre_render. * diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Derivative/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Derivative/CustomBlock.php index a94fbe356fd..592f150cfb4 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Derivative/CustomBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Derivative/CustomBlock.php @@ -46,7 +46,7 @@ class CustomBlock implements DerivativeInterface { $this->derivatives[$custom_block->uuid->value]['settings'] = array( 'info' => $custom_block->info->value, ) + $base_plugin_definition['settings']; - $this->derivatives[$custom_block->uuid->value]['subject'] = $custom_block->info->value; + $this->derivatives[$custom_block->uuid->value]['admin_label'] = $custom_block->info->value; } return $this->derivatives; } diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/block/block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/block/block/CustomBlockBlock.php index ce89a588ec4..e7e88f61db9 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/block/block/CustomBlockBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/block/block/CustomBlockBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "custom_block", - * subject = @Translation("Custom Block"), + * admin_label = @Translation("Custom block"), * module = "custom_block", * derivative = "Drupal\custom_block\Plugin\Derivative\CustomBlock", * settings = { diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 9e5bf6c21e4..9c90a5a4adb 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -70,10 +70,9 @@ abstract class BlockBase extends PluginBase implements BlockInterface { // default settings for the block plugin. $this->configuration = $this->settings(); - // @todo This loads the default subject. Is this the right place to do so? $definition = $this->getDefinition(); - if (isset($definition['subject'])) { - $this->configuration += array('subject' => $definition['subject']); + if (isset($definition['admin_label'])) { + $this->configuration += array('admin_label' => $definition['admin_label']); } } // Ensure that the default cache mode is set. @@ -238,7 +237,7 @@ abstract class BlockBase extends PluginBase implements BlockInterface { '#type' => 'textfield', '#title' => t('Title'), '#maxlength' => 255, - '#default_value' => !$entity->isNew() ? $entity->label() : $definition['subject'], + '#default_value' => !$entity->isNew() ? $entity->label() : $definition['admin_label'], ); $form['machine_name'] = array( '#type' => 'machine_name', diff --git a/core/modules/block/lib/Drupal/block/BlockListController.php b/core/modules/block/lib/Drupal/block/BlockListController.php index e8f035c182c..4b424dd039e 100644 --- a/core/modules/block/lib/Drupal/block/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/BlockListController.php @@ -138,7 +138,7 @@ class BlockListController extends ConfigEntityListController implements FormInte foreach ($entities as $entity_id => $entity) { $info = $entity->getPlugin()->getDefinition(); $form['blocks'][$entity_id]['info'] = array( - '#markup' => check_plain($info['subject']), + '#markup' => check_plain($info['admin_label']), ); $form['blocks'][$entity_id]['theme'] = array( '#type' => 'hidden', @@ -149,14 +149,14 @@ class BlockListController extends ConfigEntityListController implements FormInte '#default_value' => $entity->get('weight'), '#delta' => $weight_delta, '#title_display' => 'invisible', - '#title' => t('Weight for @block block', array('@block' => $info['subject'])), + '#title' => t('Weight for @block block', array('@block' => $info['admin_label'])), ); $form['blocks'][$entity_id]['region'] = array( '#type' => 'select', '#default_value' => $entity->get('region') != BLOCK_REGION_NONE ? $entity->get('region') : NULL, '#empty_value' => BLOCK_REGION_NONE, '#title_display' => 'invisible', - '#title' => t('Region for @block block', array('@block' => $info['subject'])), + '#title' => t('Region for @block block', array('@block' => $info['admin_label'])), '#options' => $this->regions, ); $links['configure'] = array( diff --git a/core/modules/block/lib/Drupal/block/BlockRenderController.php b/core/modules/block/lib/Drupal/block/BlockRenderController.php index e7053106585..e1c560e3755 100644 --- a/core/modules/block/lib/Drupal/block/BlockRenderController.php +++ b/core/modules/block/lib/Drupal/block/BlockRenderController.php @@ -53,7 +53,7 @@ class BlockRenderController implements EntityRenderControllerInterface { 'id' => $entity->get('plugin'), 'region' => $entity->get('region'), 'module' => $entity->get('module'), - 'subject' => check_plain($entity->label()), + 'label' => check_plain($entity->label()), ), ); } diff --git a/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php b/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php index 5beb4826814..722588d218a 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php +++ b/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php @@ -31,7 +31,7 @@ use Drupal\Core\Annotation\Translation; * task_suffix = "library", * task_title = @Translation("Library"), * title = @Translation("Add block"), - * title_attribute = "subject", + * title_attribute = "admin_label", * type = MENU_LOCAL_ACTION * ) */ @@ -144,7 +144,7 @@ class BlockPluginUI extends PluginUIBase { $plugin_definition = $this->getDefinition(); list($plugin, $theme) = explode(':', $this->getPluginId()); $row = array(); - $row[] = check_plain($display_plugin_definition['subject']); + $row[] = check_plain($display_plugin_definition['admin_label']); $row[] = array('data' => array( '#type' => 'operations', '#links' => array( diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php index d0c833ae5ff..d98f245984c 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php @@ -101,7 +101,7 @@ class BlockStorageUnitTest extends DrupalUnitTestBase { 'plugin' => 'test_html_id', 'settings' => array( 'cache' => '1', - 'subject' => t('Test block html id'), + 'admin_label' => t('Test block html id'), ), ); $this->assertIdentical($actual_properties, $expected_properties, 'The block properties are exported correctly.'); diff --git a/core/modules/block/templates/block.tpl.php b/core/modules/block/templates/block.tpl.php index 8c421319acc..16ced6027d8 100644 --- a/core/modules/block/templates/block.tpl.php +++ b/core/modules/block/templates/block.tpl.php @@ -5,7 +5,7 @@ * Default theme implementation to display a block. * * Available variables: - * - $block->subject: Block title. + * - $block->label: Block title. * - $content: Block content. * - $block->module: Module that generated the block. * - $block->delta: An ID for the block, unique within each module. @@ -48,8 +48,8 @@ -subject): ?> - >subject ?> +label): ?> + >label; ?> diff --git a/core/modules/block/tests/config/block.block.stark.test_block.yml b/core/modules/block/tests/config/block.block.stark.test_block.yml index 7428765d19d..59ba7b4c0ea 100644 --- a/core/modules/block/tests/config/block.block.stark.test_block.yml +++ b/core/modules/block/tests/config/block.block.stark.test_block.yml @@ -8,4 +8,4 @@ visibility: { } plugin: test_html_id settings: cache: '1' - subject: 'Test block html id' + admin_label: 'Test block html id' diff --git a/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestCacheBlock.php b/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestCacheBlock.php index 6665e0d4bf5..f357762f617 100644 --- a/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestCacheBlock.php +++ b/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestCacheBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "test_cache", - * subject = @Translation("Test block caching"), + * admin_label = @Translation("Test block caching"), * module = "block_test" * ) */ diff --git a/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestHtmlIdBlock.php b/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestHtmlIdBlock.php index 53e9598c457..d86f63bae09 100644 --- a/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestHtmlIdBlock.php +++ b/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestHtmlIdBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "test_html_id", - * subject = @Translation("Test block html id"), + * admin_label = @Translation("Test block html id"), * module = "block_test" * ) */ diff --git a/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestXSSTitleBlock.php b/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestXSSTitleBlock.php index 485c716957b..0144c7bc803 100644 --- a/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestXSSTitleBlock.php +++ b/core/modules/block/tests/lib/Drupal/block_test/Plugin/block/block/TestXSSTitleBlock.php @@ -14,7 +14,7 @@ use Drupal\Core\Annotation\Plugin; * * @Plugin( * id = "test_xss_title", - * subject = "", + * admin_label = "", * module = "block_test" * ) */ diff --git a/core/modules/book/lib/Drupal/book/Plugin/block/block/BookNavigationBlock.php b/core/modules/book/lib/Drupal/book/Plugin/block/block/BookNavigationBlock.php index bbce85c6c33..e81e37b9f50 100644 --- a/core/modules/book/lib/Drupal/book/Plugin/block/block/BookNavigationBlock.php +++ b/core/modules/book/lib/Drupal/book/Plugin/block/block/BookNavigationBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "book_navigation", - * subject = @Translation("Book navigation"), + * admin_label = @Translation("Book navigation"), * module = "book" * ) */ diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/block/block/RecentCommentsBlock.php b/core/modules/comment/lib/Drupal/comment/Plugin/block/block/RecentCommentsBlock.php index 7920a686297..661d6097272 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/block/block/RecentCommentsBlock.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/block/block/RecentCommentsBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "recent_comments", - * subject = @Translation("Recent comments"), + * admin_label = @Translation("Recent comments"), * module = "comment" * ) */ diff --git a/core/modules/forum/lib/Drupal/forum/Plugin/block/block/ActiveTopicsBlock.php b/core/modules/forum/lib/Drupal/forum/Plugin/block/block/ActiveTopicsBlock.php index f77aea85630..5a31b939856 100644 --- a/core/modules/forum/lib/Drupal/forum/Plugin/block/block/ActiveTopicsBlock.php +++ b/core/modules/forum/lib/Drupal/forum/Plugin/block/block/ActiveTopicsBlock.php @@ -15,7 +15,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "forum_active_block", - * subject = @Translation("Active forum topics"), + * admin_label = @Translation("Active forum topics"), * module = "forum" * ) */ diff --git a/core/modules/forum/lib/Drupal/forum/Plugin/block/block/NewTopicsBlock.php b/core/modules/forum/lib/Drupal/forum/Plugin/block/block/NewTopicsBlock.php index 696e07763a9..34b93577345 100644 --- a/core/modules/forum/lib/Drupal/forum/Plugin/block/block/NewTopicsBlock.php +++ b/core/modules/forum/lib/Drupal/forum/Plugin/block/block/NewTopicsBlock.php @@ -15,7 +15,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "forum_new_block", - * subject = @Translation("New forum topics"), + * admin_label = @Translation("New forum topics"), * module = "forum" * ) */ diff --git a/core/modules/language/lib/Drupal/language/Plugin/Derivative/LanguageBlock.php b/core/modules/language/lib/Drupal/language/Plugin/Derivative/LanguageBlock.php index 827b9b5c6db..d451b27f4a4 100644 --- a/core/modules/language/lib/Drupal/language/Plugin/Derivative/LanguageBlock.php +++ b/core/modules/language/lib/Drupal/language/Plugin/Derivative/LanguageBlock.php @@ -40,7 +40,7 @@ class LanguageBlock implements DerivativeInterface { $info = language_types_info(); foreach (language_types_get_configurable(FALSE) as $type) { $this->derivatives[$type] = $base_plugin_definition; - $this->derivatives[$type]['subject'] = t('Language switcher (!type)', array('!type' => $info[$type]['name'])); + $this->derivatives[$type]['admin_label'] = t('Language switcher (!type)', array('!type' => $info[$type]['name'])); $this->derivatives[$type]['cache'] = DRUPAL_NO_CACHE; } return $this->derivatives; diff --git a/core/modules/language/lib/Drupal/language/Plugin/block/block/LanguageBlock.php b/core/modules/language/lib/Drupal/language/Plugin/block/block/LanguageBlock.php index ec34971c4b0..ff1c83f2076 100644 --- a/core/modules/language/lib/Drupal/language/Plugin/block/block/LanguageBlock.php +++ b/core/modules/language/lib/Drupal/language/Plugin/block/block/LanguageBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "language_block", - * subject = @Translation("Language switcher"), + * admin_label = @Translation("Language switcher"), * module = "language", * derivative = "Drupal\language\Plugin\Derivative\LanguageBlock" * ) diff --git a/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php b/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php index 6f9b4ac06da..cfa5b63625d 100644 --- a/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php +++ b/core/modules/menu/lib/Drupal/menu/Plugin/Derivative/MenuBlock.php @@ -23,7 +23,7 @@ class MenuBlock extends SystemMenuBlock { // Provide block plugin definitions for all user-defined (custom) menus. foreach (menu_get_menus(FALSE) as $menu => $name) { $this->derivatives[$menu] = $base_plugin_definition; - $this->derivatives[$menu]['subject'] = $name; + $this->derivatives[$menu]['admin_label'] = $name; $this->derivatives[$menu]['cache'] = DRUPAL_NO_CACHE; } return $this->derivatives; diff --git a/core/modules/menu/lib/Drupal/menu/Plugin/block/block/MenuBlock.php b/core/modules/menu/lib/Drupal/menu/Plugin/block/block/MenuBlock.php index 4298e5e7adf..f38f191bfa7 100644 --- a/core/modules/menu/lib/Drupal/menu/Plugin/block/block/MenuBlock.php +++ b/core/modules/menu/lib/Drupal/menu/Plugin/block/block/MenuBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "menu_menu_block", - * subject = @Translation("Menu"), + * admin_label = @Translation("Menu"), * module = "menu", * derivative = "Drupal\menu\Plugin\Derivative\MenuBlock" * ) diff --git a/core/modules/node/lib/Drupal/node/Plugin/block/block/RecentContentBlock.php b/core/modules/node/lib/Drupal/node/Plugin/block/block/RecentContentBlock.php index 03c3c4398b7..40f7b1139e4 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/block/block/RecentContentBlock.php +++ b/core/modules/node/lib/Drupal/node/Plugin/block/block/RecentContentBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "node_recent_block", - * subject = @Translation("Recent content"), + * admin_label = @Translation("Recent content"), * module = "node" * ) */ diff --git a/core/modules/node/lib/Drupal/node/Plugin/block/block/SyndicateBlock.php b/core/modules/node/lib/Drupal/node/Plugin/block/block/SyndicateBlock.php index 9caabc397e0..fc506b5f624 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/block/block/SyndicateBlock.php +++ b/core/modules/node/lib/Drupal/node/Plugin/block/block/SyndicateBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "node_syndicate_block", - * subject = @Translation("Syndicate"), + * admin_label = @Translation("Syndicate"), * module = "node" * ) */ diff --git a/core/modules/search/lib/Drupal/search/Plugin/block/block/SearchBlock.php b/core/modules/search/lib/Drupal/search/Plugin/block/block/SearchBlock.php index 2bfccfd79bb..ffb38016939 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/block/block/SearchBlock.php +++ b/core/modules/search/lib/Drupal/search/Plugin/block/block/SearchBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "search_form_block", - * subject = @Translation("Search form"), + * admin_label = @Translation("Search form"), * module = "search" * ) */ diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/block/block/ShortcutsBlock.php b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/block/block/ShortcutsBlock.php index 590ff10aa1c..570c4b65c2e 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/block/block/ShortcutsBlock.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/block/block/ShortcutsBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "shortcuts", - * subject = @Translation("Shortcuts"), + * admin_label = @Translation("Shortcuts"), * module = "shortcut" * ) */ diff --git a/core/modules/statistics/lib/Drupal/statistics/Plugin/block/block/StatisticsPopularBlock.php b/core/modules/statistics/lib/Drupal/statistics/Plugin/block/block/StatisticsPopularBlock.php index a10f45c29ee..51cfa6753b0 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Plugin/block/block/StatisticsPopularBlock.php +++ b/core/modules/statistics/lib/Drupal/statistics/Plugin/block/block/StatisticsPopularBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "statistics_popular_block", - * subject = @Translation("Popular content"), + * admin_label = @Translation("Popular content"), * module = "statistics" * ) */ diff --git a/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php index 81237327351..5b7c40b286b 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Derivative/SystemMenuBlock.php @@ -45,7 +45,7 @@ class SystemMenuBlock implements DerivativeInterface { $menu = "menu-$menu"; $this->derivatives[$menu] = $base_plugin_definition; $this->derivatives[$menu]['delta'] = $menu; - $this->derivatives[$menu]['subject'] = $name; + $this->derivatives[$menu]['admin_label'] = $name; $this->derivatives[$menu]['cache'] = DRUPAL_NO_CACHE; } return $this->derivatives; diff --git a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemHelpBlock.php b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemHelpBlock.php index 9a4d706d3e9..852b5875a2e 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemHelpBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemHelpBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "system_help_block", - * subject = @Translation("System Help"), + * admin_label = @Translation("System Help"), * module = "system" * ) */ diff --git a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMainBlock.php b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMainBlock.php index 2f10f57ac8c..7583ec08b1b 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMainBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMainBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "system_main_block", - * subject = @Translation("Main page content"), + * admin_label = @Translation("Main page content"), * module = "system" * ) */ diff --git a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMenuBlock.php b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMenuBlock.php index d653fd8e6fb..20a57b441a1 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMenuBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemMenuBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "system_menu_block", - * subject = @Translation("System Menu"), + * admin_label = @Translation("System Menu"), * module = "system", * derivative = "Drupal\system\Plugin\Derivative\SystemMenuBlock" * ) diff --git a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemPoweredByBlock.php b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemPoweredByBlock.php index 4749768f8cf..5138b982c65 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemPoweredByBlock.php +++ b/core/modules/system/lib/Drupal/system/Plugin/block/block/SystemPoweredByBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "system_powered_by_block", - * subject = @Translation("Powered by Drupal"), + * admin_label = @Translation("Powered by Drupal"), * module = "system" * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php index 08eede6b0dd..cec225d5b84 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "user_login_block", - * subject = @Translation("User login"), + * admin_label = @Translation("User login"), * module = "user" * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php index 5c39547e9f8..cf115633d4d 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserNewBlock.php @@ -16,7 +16,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "user_new_block", - * subject = @Translation("Who's new"), + * admin_label = @Translation("Who's new"), * module = "user" * ) */ diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php index 6a9fb683980..ef6dc68e804 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserOnlineBlock.php @@ -19,7 +19,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "user_online_block", - * subject = @Translation("Who's online"), + * admin_label = @Translation("Who's online"), * module = "user" * ) */ diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php index 37af0a2f7e3..7d4d161e640 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php @@ -61,7 +61,7 @@ class ViewsBlock implements DerivativeInterface { } } $this->derivatives[$delta] = array( - 'subject' => $desc, + 'admin_label' => $desc, 'cache' => $display->getCacheType() ); $this->derivatives[$delta] += $base_plugin_definition; diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php index 9ffa183c373..59865f30240 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php @@ -53,7 +53,7 @@ class ViewsExposedFilterBlock implements DerivativeInterface { $delta = $view->id() . '-' . $display->display['id']; $desc = t('Exposed form: @view-@display_id', array('@view' => $view->id(), '@display_id' => $display->display['id'])); $this->derivatives[$delta] = array( - 'subject' => $desc, + 'admin_label' => $desc, 'cache' => DRUPAL_NO_CACHE, ); $this->derivatives[$delta] += $base_plugin_definition; diff --git a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php index 7cac4f68e95..e4ec9a6bebd 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php @@ -18,7 +18,7 @@ use Drupal\Component\Plugin\Discovery\DiscoveryInterface; * * @Plugin( * id = "views_block", - * subject = @Translation("Views Block"), + * admin_label = @Translation("Views Block"), * module = "views", * derivative = "Drupal\views\Plugin\Derivative\ViewsBlock" * ) diff --git a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php index f74ebf1cf6f..5dfd2c05ba1 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php @@ -15,7 +15,7 @@ use Drupal\Core\Annotation\Translation; * * @Plugin( * id = "views_exposed_filter_block", - * subject = @Translation("Views Exposed Filter Block"), + * admin_label = @Translation("Views Exposed Filter Block"), * module = "views", * derivative = "Drupal\views\Plugin\Derivative\ViewsExposedFilterBlock" * )