class SystemPoweredByBlock in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php \Drupal\system\Plugin\Block\SystemPoweredByBlock
- 9 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
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\Core\Block\BlockBase implements BlockPluginInterface, ContextAwarePluginInterface, PluginWithFormsInterface, PreviewAwarePluginInterface, PreviewFallbackInterface uses BlockPluginTrait, ContextAwarePluginAssignmentTrait, ContextAwarePluginTrait
- class \Drupal\system\Plugin\Block\SystemPoweredByBlock
- class \Drupal\Core\Block\BlockBase implements BlockPluginInterface, ContextAwarePluginInterface, PluginWithFormsInterface, PreviewAwarePluginInterface, PreviewFallbackInterface uses BlockPluginTrait, ContextAwarePluginAssignmentTrait, ContextAwarePluginTrait
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of SystemPoweredByBlock
File
- core/
modules/ system/ src/ Plugin/ Block/ SystemPoweredByBlock.php, line 15
Namespace
Drupal\system\Plugin\BlockView 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>',
];
}
}