public function UserRegisterBlock::build in Glazed Theme Helper 8
Implements \Drupal\block\BlockBase::build().
Overrides BlockPluginInterface::build
File
- src/
Plugin/ Block/ UserRegisterBlock.php, line 77
Class
- UserRegisterBlock
- Provides a block for the user registration form.
Namespace
Drupal\glazed_helper\Plugin\BlockCode
public function build() {
$build = [];
$account = $this->entityTypeManager
->getStorage('user')
->create([]);
$build['form'] = $this->entityFormBuilder
->getForm($account, 'register');
return $build;
}