Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Block.php

function Block::label

Overrides EntityBase::label

File

core/modules/block/src/Entity/Block.php, line 210

Class

Block
Defines a Block configuration entity class.

Namespace

Drupal\block\Entity

Code

public function label() {
    $settings = $this->get('settings');
    if ($settings['label']) {
        return $settings['label'];
    }
    else {
        $definition = $this->getPlugin()
            ->getPluginDefinition();
        return $definition['admin_label'];
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal