diff --git a/core/lib/Drupal/Core/Block/BlockBase.php b/core/lib/Drupal/Core/Block/BlockBase.php index 4270f20..2fe863d 100644 --- a/core/lib/Drupal/Core/Block/BlockBase.php +++ b/core/lib/Drupal/Core/Block/BlockBase.php @@ -82,7 +82,7 @@ protected function baseConfigurationDefaults() { return array( 'id' => $this->getPluginId(), 'label' => '', - 'provider' => $this->pluginDefinition['provider'], + 'provider' => $this->getPluginDefinition['provider'], 'label_display' => BlockInterface::BLOCK_LABEL_VISIBLE, ); } diff --git a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php index be51a09..2278c97 100644 --- a/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php +++ b/core/modules/block/tests/src/Kernel/BlockInterfaceTest.php @@ -50,7 +50,6 @@ public function testBlockInterface() { $display_block->setConfigurationValue('display_message', 'My custom display message.'); $expected_configuration['display_message'] = 'My custom display message.'; $this->assertIdentical($display_block->getConfiguration(), $expected_configuration, 'The block configuration was updated correctly.'); - $definition = $display_block->getPluginDefinition(); $expected_form = array( 'provider' => array( @@ -60,7 +59,7 @@ public function testBlockInterface() { 'admin_label' => array( '#type' => 'item', '#title' => t('Block description'), - '#plain_text' => $definition['admin_label'], + '#plain_text' => $display_block->getPluginDefinition()['admin_label'], ), 'label' => array( '#type' => 'textfield',