Skip to content

Instantly share code, notes, and snippets.

View sriharsha1235's full-sized avatar

Sriharsha sriharsha1235

View GitHub Profile
@otarza
otarza / Drupal-8-register-form.php
Created March 2, 2016 10:42
Render drupal 8 register form
<?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);
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');