Version 1
[yaffs-website] / web / core / modules / system / src / Plugin / Block / SystemPoweredByBlock.php
diff --git a/web/core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php b/web/core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php
new file mode 100644 (file)
index 0000000..c1e0ba8
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\system\Plugin\Block;
+
+use Drupal\Core\Block\BlockBase;
+
+/**
+ * Provides a 'Powered by Drupal' block.
+ *
+ * @Block(
+ *   id = "system_powered_by_block",
+ *   admin_label = @Translation("Powered by Drupal")
+ * )
+ */
+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>'];
+  }
+
+}