You are here

public function UserRegisterBlock::build in DXPR 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\Block

Code

public function build() {
  $build = [];
  $account = $this->entityTypeManager
    ->getStorage('user')
    ->create([]);
  $build['form'] = $this->entityFormBuilder
    ->getForm($account, 'register');
  return $build;
}