summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-06-14 02:18:37 +0200
committerAlex Pott2013-06-14 02:18:37 +0200
commitfd9804d886a5dfabbf5fd01dd49e73c7c3e35ad0 (patch)
treea6c738bb6f34aa8078d0561a58f1d2ab6eb05185
parent0cc160dbf3876b7d6c951f9ae8091b45693304ae (diff)
Issue #2014215 by sdboyer: Shift render array defaults back out onto BlockRenderController .
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php4
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php4
-rw-r--r--core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php4
-rw-r--r--core/modules/block/lib/Drupal/block/BlockBase.php29
-rw-r--r--core/modules/block/lib/Drupal/block/BlockRenderController.php20
-rw-r--r--core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php13
-rw-r--r--core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php2
-rw-r--r--core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php4
-rw-r--r--core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php4
-rw-r--r--core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php4
-rw-r--r--core/modules/forum/forum.module4
-rw-r--r--core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php4
-rw-r--r--core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php4
-rw-r--r--core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php4
-rw-r--r--core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php4
-rw-r--r--core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php4
-rw-r--r--core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php4
-rw-r--r--core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php4
-rw-r--r--core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php4
-rw-r--r--core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php4
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php4
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php4
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php4
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php4
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php4
29 files changed, 71 insertions, 93 deletions
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 b9971ce..423c903 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
@@ -62,9 +62,9 @@ class AggregatorCategoryBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$id = $this->getPluginId();
if ($category = db_query('SELECT cid, title, block FROM {aggregator_category} WHERE cid = :cid', array(':cid' => $id))->fetchObject()) {
$result = db_query_range('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = :cid ORDER BY i.timestamp DESC, i.iid DESC', 0, $this->configuration['block_count'], array(':cid' => $category->cid));
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 b72936b..3cd519f 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
@@ -62,9 +62,9 @@ class AggregatorFeedBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
// Plugin IDs look something like this: aggregator_feed_block:1.
list(, $id) = explode(':', $this->getPluginId());
if ($feed = db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid', array(':fid' => $id))->fetchObject()) {
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 01b11ba..0d17fa1 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
@@ -67,9 +67,9 @@ class CustomBlockBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
// @todo Clean up when http://drupal.org/node/1874498 lands.
list(, $uuid) = explode(':', $this->getPluginId());
if ($block = entity_load_by_uuid('custom_block', $uuid)) {
diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php
index adb80fb..6efda89 100644
--- a/core/modules/block/lib/Drupal/block/BlockBase.php
+++ b/core/modules/block/lib/Drupal/block/BlockBase.php
@@ -224,33 +224,4 @@ abstract class BlockBase extends PluginBase implements BlockPluginInterface {
* @see \Drupal\block\BlockBase::submit()
*/
public function blockSubmit($form, &$form_state) {}
-
- /**
- * Implements \Drupal\block\BlockInterface::build().
- */
- public function build() {
- $build = array();
- $plugin_id = $this->getPluginId();
- if ($content = $this->blockBuild()) {
- $build = array(
- '#theme' => 'block',
- 'content' => $content,
- '#configuration' => $this->configuration,
- '#plugin_id' => $plugin_id,
- );
- $build['#configuration']['label'] = check_plain($this->configuration['label']);
- }
- list($base_id) = explode(':', $plugin_id);
- drupal_alter(array('block_view', "block_view_$base_id"), $build, $this);
- return $build;
- }
-
- /**
- * Adds block-type-specific render handling for the block plugin.
- *
- * @return array
- * A renderable array representing the content of this block.
- */
- abstract protected function blockBuild();
-
}
diff --git a/core/modules/block/lib/Drupal/block/BlockRenderController.php b/core/modules/block/lib/Drupal/block/BlockRenderController.php
index 12fff82..45a85d9 100644
--- a/core/modules/block/lib/Drupal/block/BlockRenderController.php
+++ b/core/modules/block/lib/Drupal/block/BlockRenderController.php
@@ -36,7 +36,25 @@ class BlockRenderController implements EntityRenderControllerInterface {
public function viewMultiple(array $entities = array(), $view_mode = 'full', $langcode = NULL) {
$build = array();
foreach ($entities as $entity_id => $entity) {
- $build[$entity_id] = $entity->getPlugin()->build();
+ $plugin = $entity->getPlugin();
+ $plugin_id = $plugin->getPluginId();
+
+ if ($content = $plugin->build()) {
+ $configuration = $plugin->getConfig();
+ $build[$entity_id] = array(
+ '#theme' => 'block',
+ 'content' => $content,
+ '#configuration' => $configuration,
+ '#plugin_id' => $plugin_id,
+ );
+ $build[$entity_id]['#configuration']['label'] = check_plain($configuration['label']);
+ }
+ else {
+ $build[$entity_id] = array();
+ }
+
+ list($base_id) = explode(':', $plugin_id);
+ drupal_alter(array('block_view', "block_view_$base_id"), $build[$entity_id], $plugin);
// @todo Remove after fixing http://drupal.org/node/1989568.
$build[$entity_id]['#block'] = $entity;
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php
index 58ff0c2..e71a146 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php
@@ -92,18 +92,7 @@ class BlockInterfaceTest extends DrupalUnitTestBase {
$this->assertIdentical($display_block->form(array(), $form_state), $expected_form, 'Only the expected form elements were present.');
$expected_build = array(
- '#theme' => 'block',
- 'content' => array(
- '#children' => 'My custom display message.',
- ),
- '#configuration' => array(
- 'label' => 'Custom Display Message',
- 'display_message' => 'My custom display message.',
- 'module' => 'block_test',
- 'label_display' => BLOCK_LABEL_VISIBLE,
- 'cache' => DRUPAL_NO_CACHE,
- ),
- '#plugin_id' => 'test_block_instantiation',
+ '#children' => 'My custom display message.',
);
// Ensure the build array is proper.
$this->assertIdentical($display_block->build(), $expected_build, 'The plugin returned the appropriate build array.');
diff --git a/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php b/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
index ba45a4e..4c28638 100644
--- a/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
+++ b/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
@@ -60,7 +60,7 @@ class TestBlockInstantiation extends BlockBase {
/**
* {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
'#children' => $this->configuration['display_message'],
);
diff --git a/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php b/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php
index 1bde917..c83d668 100644
--- a/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php
+++ b/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php
@@ -34,9 +34,9 @@ class TestCacheBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
'#children' => \Drupal::state()->get('block_test.content'),
);
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 7461aa7..fd48f7d 100644
--- a/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
+++ b/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
@@ -59,9 +59,9 @@ class BookNavigationBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$current_bid = 0;
if ($node = menu_get_object()) {
$current_bid = empty($node->book['bid']) ? 0 : $node->book['bid'];
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 387f7ce..cf442db 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php
@@ -59,9 +59,9 @@ class RecentCommentsBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
'#theme' => 'comment_block',
'#number' => $this->configuration['block_count'],
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index c5af0f4..c32816c 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -652,8 +652,8 @@ function forum_form_node_form_alter(&$form, &$form_state, $form_id) {
*
* This function can be used as a #pre_render callback.
*
- * @see \Drupal\forum\Plugin\block\block\NewTopicsBlock::blockBuild()
- * @see \Drupal\forum\Plugin\block\block\ActiveTopicsBlock::blockBuild()
+ * @see \Drupal\forum\Plugin\block\block\NewTopicsBlock::build()
+ * @see \Drupal\forum\Plugin\block\block\ActiveTopicsBlock::build()
*/
function forum_block_view_pre_render($elements) {
$result = $elements['#query']->execute();
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 b522d65..176fa14 100644
--- a/core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php
+++ b/core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php
@@ -22,9 +22,9 @@ use Drupal\Core\Annotation\Translation;
class ActiveTopicsBlock extends ForumBlockBase {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$query = db_select('forum_index', 'f')
->fields('f')
->addTag('node_access')
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 4e85482..02f4650 100644
--- a/core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php
+++ b/core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php
@@ -22,9 +22,9 @@ use Drupal\Core\Annotation\Translation;
class NewTopicsBlock extends ForumBlockBase {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$query = db_select('forum_index', 'f')
->fields('f')
->addTag('node_access')
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 4ab3bfd..95a9d12 100644
--- a/core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php
+++ b/core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php
@@ -31,9 +31,9 @@ class LanguageBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$build = array();
$path = drupal_is_front_page() ? '<front>' : current_path();
list($plugin_id, $type) = explode(':', $this->getPluginId());
diff --git a/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php b/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
index 86dcd07..0e83734 100644
--- a/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
+++ b/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
@@ -24,9 +24,9 @@ use Drupal\Core\Annotation\Translation;
class MenuBlock extends SystemMenuBlock {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
list($plugin, $menu) = explode(':', $this->getPluginId());
return menu_tree($menu);
}
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 3712bff..8144161 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php
@@ -59,9 +59,9 @@ class RecentContentBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
if ($nodes = node_get_recent($this->configuration['block_count'])) {
return array(
'#theme' => 'node_recent_block',
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 56b3a19..1440a48 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php
@@ -39,9 +39,9 @@ class SyndicateBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
'#theme' => 'feed_icon',
'#url' => 'rss.xml',
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 1afbfae..00f5b60 100644
--- a/core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php
+++ b/core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php
@@ -30,9 +30,9 @@ class SearchBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(drupal_get_form('search_block_form'));
}
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 ff89f50..5296971 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php
@@ -23,9 +23,9 @@ use Drupal\Core\Annotation\Translation;
class ShortcutsBlock extends BlockBase {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
shortcut_renderable_links(shortcut_current_displayed_set()),
);
diff --git a/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php
index 6eebb83..d11412e 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php
@@ -116,9 +116,9 @@ class StatisticsPopularBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$content = array();
if ($this->day_list) {
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php
index a370374..c19a575 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php
@@ -38,9 +38,9 @@ class SystemHelpBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
'#children' => $this->help,
);
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php
index db18651..997d563 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php
@@ -23,9 +23,9 @@ use Drupal\Core\Annotation\Translation;
class SystemMainBlock extends BlockBase {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
drupal_set_page_content()
);
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 847249e..8e7879e 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php
@@ -33,9 +33,9 @@ class SystemMenuBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
list($plugin, $derivative) = explode(':', $this->getPluginId());
// Derivatives are prefixed with 'menu-'.
$menu = substr($derivative, 5);
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php
index 3969710..7edd34b 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php
@@ -23,9 +23,9 @@ use Drupal\Core\Annotation\Translation;
class SystemPoweredByBlock extends BlockBase {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
return array(
'#children' => theme('system_powered_by'),
);
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 dd890bd..0c8aa2a 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php
@@ -30,9 +30,9 @@ class UserLoginBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$form = drupal_get_form('user_login_form');
unset($form['name']['#attributes']['autofocus']);
unset($form['name']['#description']);
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 41c2a43..847512a 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php
@@ -62,9 +62,9 @@ class UserNewBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
// Retrieve a list of new users who have accessed the site successfully.
$items = db_query_range('SELECT uid, name FROM {users} WHERE status <> 0 AND access <> 0 ORDER BY created DESC', 0, $this->configuration['whois_new_count'])->fetchAll();
$build = array(
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 fbae351..f2452c9 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php
@@ -76,9 +76,9 @@ class UserOnlineBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
// Count users active within the defined period.
$interval = REQUEST_TIME - $this->configuration['seconds_online'];
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
index 5b82a7b..e9af634 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
@@ -69,9 +69,9 @@ class ViewsBlock extends BlockBase {
}
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
if ($output = $this->view->executeDisplay($this->displayID)) {
$output = $this->view->executeDisplay($this->displayID);
// Set the label to the title configured in the view.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php
index 21d3578..577caa5 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php
@@ -23,9 +23,9 @@ use Drupal\Core\Annotation\Translation;
class ViewsExposedFilterBlock extends ViewsBlock {
/**
- * Implements \Drupal\block\BlockBase::blockBuild().
+ * {@inheritdoc}
*/
- protected function blockBuild() {
+ public function build() {
$output = $this->view->display_handler->viewExposedFormBlocks();
// Before returning the block output, convert it to a renderable array with
// contextual links.