Mercurial > hg > isophonics-drupal-site
annotate core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\system\Plugin\Block; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Core\Block\BlockBase; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Provides a 'Powered by Drupal' block. |
Chris@0 | 9 * |
Chris@0 | 10 * @Block( |
Chris@0 | 11 * id = "system_powered_by_block", |
Chris@0 | 12 * admin_label = @Translation("Powered by Drupal") |
Chris@0 | 13 * ) |
Chris@0 | 14 */ |
Chris@0 | 15 class SystemPoweredByBlock extends BlockBase { |
Chris@0 | 16 |
Chris@0 | 17 /** |
Chris@0 | 18 * {@inheritdoc} |
Chris@0 | 19 */ |
Chris@0 | 20 public function defaultConfiguration() { |
Chris@0 | 21 return ['label_display' => FALSE]; |
Chris@0 | 22 } |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * {@inheritdoc} |
Chris@0 | 26 */ |
Chris@0 | 27 public function build() { |
Chris@0 | 28 return ['#markup' => '<span>' . $this->t('Powered by <a href=":poweredby">Drupal</a>', [':poweredby' => 'https://www.drupal.org']) . '</span>']; |
Chris@0 | 29 } |
Chris@0 | 30 |
Chris@0 | 31 } |