diff --git a/core/lib/Drupal/Core/Block/BlockBase.php b/core/lib/Drupal/Core/Block/BlockBase.php index f588451..050d4aa 100644 --- a/core/lib/Drupal/Core/Block/BlockBase.php +++ b/core/lib/Drupal/Core/Block/BlockBase.php @@ -41,9 +41,10 @@ public function label() { return $this->configuration['label']; } + $definition = $this->getPluginDefinition(); // Cast the admin label to a string since it is an object. // @see \Drupal\Core\StringTranslation\TranslatableMarkup - return (string) $this->getPluginDefinition()['admin_label']; + return (string) $definition['admin_label']; } /** @@ -82,7 +83,7 @@ protected function baseConfigurationDefaults() { return array( 'id' => $this->getPluginId(), 'label' => '', - 'provider' => $this->getPluginDefinition()['provider'], + 'provider' => $this->pluginDefinition['provider'], 'label_display' => BlockInterface::BLOCK_LABEL_VISIBLE, ); }