This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| #!/bin/sh | |
| sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini | |
| launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php71.plist | |
| launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php71.plist | |
| sudo brew services restart php71 | |
| echo "xdebug disabled" |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| class ChandanUserController extends ControllerBase { | |
| /// class properties etc. | |
| /// construction | |
| public function editProfile() { | |
| // Entity you want to edit. | |
| $entity = User::load(1); | |
| // Form builder service | |
| $builder = \Drupal::service('entity.form_builder'); | |
| // get the form: form mode = 'profile', it is not default form mode. | |
| // new form can be created on the "Form Display Setting" |