Created
March 2, 2016 10:42
-
-
Save otarza/46d6bd175cdab8036f7f to your computer and use it in GitHub Desktop.
Render drupal 8 register form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$entity = \Drupal::entityTypeManager()->getStorage('user')->create(array()); | |
$formObject = \Drupal::entityTypeManager() | |
->getFormObject('user', 'register') | |
->setEntity($entity); | |
$form = \Drupal::formBuilder()->getForm($formObject); | |
print \Drupal::service('renderer')->render($form); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment