You are here

class SystemPoweredByBlock in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php \Drupal\system\Plugin\Block\SystemPoweredByBlock
  2. 9 core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php \Drupal\system\Plugin\Block\SystemPoweredByBlock

Provides a 'Powered by Drupal' block.

Plugin annotation


@Block(
  id = "system_powered_by_block",
  admin_label = @Translation("Powered by Drupal")
)

Hierarchy

Expanded class hierarchy of SystemPoweredByBlock

File

core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php, line 15

Namespace

Drupal\system\Plugin\Block
View source
class SystemPoweredByBlock extends BlockBase {

  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [
      'label_display' => FALSE,
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function build() {
    return [
      '#markup' => '<span>' . $this
        ->t('Powered by <a href=":poweredby">Drupal</a>', [
        ':poweredby' => 'https://www.drupal.org',
      ]) . '</span>',
    ];
  }

}

Members