class SystemPoweredByBlock

Same name in other branches
  1. 9 core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php \Drupal\system\Plugin\Block\SystemPoweredByBlock
  2. 10 core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php \Drupal\system\Plugin\Block\SystemPoweredByBlock
  3. 11.x 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

Title Sort descending Modifiers Object type Summary
SystemPoweredByBlock::build public function
SystemPoweredByBlock::defaultConfiguration public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.