public function WelcomeUserNameBlock::__construct in Welcome Username 8
Constructs a new WelcomeUserNameBlock.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Form\FormBuilderInterface $form_builder: The form_builder service.
\Drupal\Core\Session\AccountProxy $currentUser: The current_user service.
\Drupal\Core\Render\Renderer $renderer: The renderer service.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ WelcomeUserNameBlock.php, line 76
Class
- WelcomeUserNameBlock
- Provides a 'Welcome Username Login/Logout' Block.
Namespace
Drupal\welcome_username\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, FormBuilderInterface $form_builder, AccountProxy $currentUser, Renderer $renderer) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->formBuilder = $form_builder;
$this->currentUser = $currentUser;
$this->renderer = $renderer;
}