diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 3790b38..5498a43 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -27,18 +27,6 @@ /** * {@inheritdoc} */ - public function label() { - if (!empty($this->configuration['label'])) { - return $this->configuration['label']; - } - - $definition = $this->getPluginDefinition(); - return $definition['admin_label']; - } - - /** - * {@inheritdoc} - */ public function __construct(array $configuration, $plugin_id, $plugin_definition) { parent::__construct($configuration, $plugin_id, $plugin_definition); @@ -138,7 +126,7 @@ public function buildConfigurationForm(array $form, array &$form_state) { '#type' => 'textfield', '#title' => $this->t('Title'), '#maxlength' => 255, - '#default_value' => $this->label(), + '#default_value' => $this->getRawlabel(), '#required' => TRUE, ); $form['label_display'] = array( @@ -316,7 +304,7 @@ public function getDefaultLabel() { */ public function getRawLabel() { $configuration = $this->getConfiguration(); - // Override titles should supersede native title logic. + // Override label should supersede native label logic. return isset($configuration['label']) ? $configuration['label'] : $this->getDefaultLabel(); } @@ -333,7 +321,7 @@ public function getLabel() { * {@inheritdoc} */ public function isLabelVisible() { - // Assume the title is visible if the setting does not exist. + // Assume the label is visible if the setting does not exist. if (!isset($this->configuration['label_display'])) { return TRUE; } diff --git a/core/modules/block/lib/Drupal/block/BlockPluginInterface.php b/core/modules/block/lib/Drupal/block/BlockPluginInterface.php index 394509c..8a3c189 100644 --- a/core/modules/block/lib/Drupal/block/BlockPluginInterface.php +++ b/core/modules/block/lib/Drupal/block/BlockPluginInterface.php @@ -24,17 +24,6 @@ interface BlockPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface, CacheableInterface { /** - * Returns the user-facing block label. - * - * @todo Provide other specific label-related methods in - * https://drupal.org/node/2025649. - * - * @return string - * The block label. - */ - public function label(); - - /** * Indicates whether the block should be shown. * * This method allows base implementations to add general access restrictions