One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
## Create new branch and switch to it at the same time. | |
git checkout -b newbranch | |
## This is shorthand for: | |
## git branch newbranch | |
## git checkout newbranch | |
## Basic Merging | |
git checkout master | |
## Switched to branch 'master' |
git commit -m "Text for the commit." --author="davidjguru <[email protected]>" |
# Recursive grep | |
$ grep -R -e “string” /path/ |
name: Form Example | |
type: module | |
description: Demonstrates how to build a form with Form API | |
package: Custom | |
core: 8.x |
<?php | |
/** | |
* @file | |
* Install, update and uninstall functions for the formexample module. | |
*/ | |
/** | |
* Implements hook_install(). | |
* |
formexample_form: | |
path: 'formexample/myform' | |
defaults: | |
_title: 'Form Example Drupal 8' | |
_form: '\Drupal\formexample\Form\FormExample' | |
requirements: | |
_permission: 'access content' |
<?php | |
/** | |
* @file | |
* Contains \Drupal\formexample\Form\FormExample. | |
*/ | |
namespace Drupal\formexample\Form; | |
use Drupal\Core\Form\FormBase; |
<?php | |
function helloworld_multistep_example_form($form, &$form_state) | |
{ | |
// We add 2 keys to form_state ("step" and "state") to keep track | |
// of state in a multistep form. | |
$step = isset($form_state['step'])? ($form_state['step']) : (1); | |
$form['heading'] = array( | |
'#type' => 'markup', |
name: Alter Forms | |
description: Custom module to alter forms | |
package: Development | |
type: module | |
core: 8.x | |
dependencies: | |
- devel:kint | |
- search_kint:search_kint |