File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ The DrupalAppConsole not is a competition of Drush it’s your new best friend.
10
10
``` bash
11
11
$ cd path/to/drupal/8
12
12
$ 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
15
15
```
16
16
17
17
### Usage
18
18
19
19
#### Generate module structure
20
20
``` bash
21
- $ ./console generate:module
21
+ $ ./bin/ console generate:module
22
22
23
23
Welcome to the Drupal module generator
24
24
@@ -48,3 +48,21 @@ modules/module_name/
48
48
49
49
11 directories, 3 files
50
50
```
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
+ ```
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\ArgvInput;
7
7
use Symfony \Component \Debug \Debug ;
8
8
9
9
set_time_limit (0 );
10
- require_once __DIR__ .'/core /includes/bootstrap.inc ' ;
10
+ require_once __DIR__ .'/../../../.. /includes/bootstrap.inc ' ;
11
11
drupal_bootstrap (DRUPAL_BOOTSTRAP_FULL );
12
12
13
13
$ input = new ArgvInput ();
You can’t perform that action at this time.
0 commit comments