Skip to content

Commit 4c66dbb

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 298bc61 + 693056b commit 4c66dbb

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ The DrupalAppConsole not is a competition of Drush it’s your new best friend.
1010
```bash
1111
$ cd path/to/drupal/8
1212
$ curl -sS https://getcomposer.org/installer | php
13-
$ php composer.phar require hechoendrupal/drupal-app-console:dev-master
14-
$ cp core/vendor/hechoendrupal/drupal-app-console/bin/console . # This step is provisional
13+
$ COMPOSER_BIN_DIR=bin php composer.phar require hechoendrupal/drupal-app-console:dev-master
14+
$ ./bin/console --help
1515
```
1616

1717
### Usage
1818

1919
#### Generate module structure
2020
```bash
21-
$ ./console generate:module
21+
$ ./bin/console generate:module
2222

2323
Welcome to the Drupal module generator
2424

@@ -48,3 +48,21 @@ modules/module_name/
4848

4949
11 directories, 3 files
5050
```
51+
52+
#### Generate controller structure
53+
```bash
54+
$ ./bin/console generate:controller
55+
56+
Welcome to the Drupal controller generator
57+
58+
Enter your module: : module_name
59+
Enter the controller name [DefaultControler]: FrontController
60+
Enter your service: : twig
61+
Enter your service: : database
62+
Enter your service: : config.factory
63+
Enter your service: : config.context
64+
Enter your service: :
65+
Update routing file? [yes]?
66+
67+
$ cat modules/module_name/lib/Drupal/module_name/Controller/FrontController.php
68+
```

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\ArgvInput;
77
use Symfony\Component\Debug\Debug;
88

99
set_time_limit(0);
10-
require_once __DIR__.'/core/includes/bootstrap.inc';
10+
require_once __DIR__.'/../../../../includes/bootstrap.inc';
1111
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
1212

1313
$input = new ArgvInput();

0 commit comments

Comments
 (0)