comparison core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\system\Plugin\Block;
4
5 use Drupal\Core\Block\BlockBase;
6
7 /**
8 * Provides a 'Powered by Drupal' block.
9 *
10 * @Block(
11 * id = "system_powered_by_block",
12 * admin_label = @Translation("Powered by Drupal")
13 * )
14 */
15 class SystemPoweredByBlock extends BlockBase {
16
17 /**
18 * {@inheritdoc}
19 */
20 public function defaultConfiguration() {
21 return ['label_display' => FALSE];
22 }
23
24 /**
25 * {@inheritdoc}
26 */
27 public function build() {
28 return ['#markup' => '<span>' . $this->t('Powered by <a href=":poweredby">Drupal</a>', [':poweredby' => 'https://www.drupal.org']) . '</span>'];
29 }
30
31 }