public function ThunderPoweredByBlock::build in Thunder 8.3
Same name and namespace in other branches
- 8.5 src/Plugin/Block/ThunderPoweredByBlock.php \Drupal\thunder\Plugin\Block\ThunderPoweredByBlock::build()
- 8.2 src/Plugin/Block/ThunderPoweredByBlock.php \Drupal\thunder\Plugin\Block\ThunderPoweredByBlock::build()
- 8.4 src/Plugin/Block/ThunderPoweredByBlock.php \Drupal\thunder\Plugin\Block\ThunderPoweredByBlock::build()
- 6.2.x src/Plugin/Block/ThunderPoweredByBlock.php \Drupal\thunder\Plugin\Block\ThunderPoweredByBlock::build()
- 6.0.x src/Plugin/Block/ThunderPoweredByBlock.php \Drupal\thunder\Plugin\Block\ThunderPoweredByBlock::build()
- 6.1.x src/Plugin/Block/ThunderPoweredByBlock.php \Drupal\thunder\Plugin\Block\ThunderPoweredByBlock::build()
Builds and returns the renderable array for this block plugin.
If a block should not be rendered because it has no content, then this method must also ensure to return no content: it must then only return an empty array, or an empty array with #cache set (with cacheability metadata indicating the circumstances for it being empty).
Return value
array A renderable array representing the content of the block.
Overrides BlockPluginInterface::build
See also
\Drupal\block\BlockViewBuilder
File
- src/
Plugin/ Block/ ThunderPoweredByBlock.php, line 27
Class
- ThunderPoweredByBlock
- Provides a 'Powered by Thunder' block.
Namespace
Drupal\thunder\Plugin\BlockCode
public function build() {
return [
'#markup' => '<span>' . $this
->t('Powered by <a href=":poweredby">Thunder</a>', [
':poweredby' => 'http://www.thunder.org',
]) . '</span>',
];
}