Skip to content

Commit 8827c7d

Browse files
author
Andy McCormick
committed
updated CLI pages
1 parent 097d329 commit 8827c7d

File tree

9 files changed

+33
-67
lines changed

9 files changed

+33
-67
lines changed

docs/cli/built-in-commands/make-action.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ Action Generator -- Creates a new action for an add-on
1515
### Generating an action:
1616

1717
`php eecli.php make:action MyNewAction --addon=my_existing_addon`
18+
19+
TIP: For more information on using the `make:action` command to create new action, reference [Adding Actions](development/actions.md).

docs/cli/built-in-commands/make-addon.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,6 @@ Check out our video tutorial generating an add-on!
1010
## Options list:
1111

1212
```
13-
--extension
14-
--ext
15-
Create an extension
16-
17-
--plugin
18-
--pi
19-
Create a plugin
20-
21-
--fieldtype
22-
--ft
23-
Create a fieldtype
24-
25-
--module
26-
--mod
27-
Create a module
28-
29-
--typography
30-
-t
31-
Should use plugin typography
32-
33-
--has-settings=<value>
34-
-e <value>
35-
Add-on has settings (yes/no)
36-
37-
--compatibility-mode
38-
-p
39-
Generate add-on that is compatible with ExpressionEngine versions lower than 7.2.0 and lower than 6.4.0
40-
4113
--version=<value>
4214
-v <value>
4315
Version of the add-on
@@ -54,43 +26,14 @@ Check out our video tutorial generating an add-on!
5426
-u <value>
5527
Author url of the add-on
5628
57-
--services=<value> [--services=<value> [...]]
58-
-s <value> [-s <value> [...]]
59-
Services to create. Multi-pass option.
60-
61-
--models=<value> [--models=<value> [...]]
62-
-m <value> [-m <value> [...]]
63-
Models to create. Multi-pass option.
6429
65-
--commands=<value> [--commands=<value> [...]]
66-
-c <value> [-c <value> [...]]
67-
Commands to create. Multi-pass option.
68-
69-
--consents=<value> [--consents=<value> [...]]
70-
-n <value> [-n <value> [...]]
71-
Consents. Multi-pass option.
72-
73-
--cookies=<value> [--cookies=<value> [...]]
74-
-k <value> [-k <value> [...]]
75-
Cookies to create, with a colon separating name and value (i.e. name:value). Multi-pass option.
76-
77-
--hooks=<value> [--hooks=<value> [...]]
78-
-o <value> [-o <value> [...]]
79-
Hooks in use. Multi-pass option.
8030
8131
```
8232

8333
## Examples:
8434

85-
### Generating an extension:
86-
87-
`php eecli.php make:addon example_extension --ext --description "Description of addon" --version="1.0.0" --author="Joe Shmoe" --author-url='www.example.com' --has-settings='yes' --hooks=cp_custom_menu`
88-
89-
### Generating a module:
90-
91-
`php eecli.php make:addon my_awesome_mod --mod --description "Description of addon" --version="1.0.0" --author="Joe Shmoe" --author-url='www.example.com' --has-settings='yes'`
92-
93-
### Generating a module in compatibility mode:
35+
### Generating an add-on:
9436

95-
`php eecli.php make:addon my_awesome_mod --mod --description "Description of addon" --version="1.0.0" --author="Joe Shmoe" --author-url='www.example.com' --has-settings='yes' --compatibility-mode`
37+
`php eecli.php make:addon amazing_add_on --description "Description of addon" --version="1.0.0" --author="Joe Shmoe" --author-url='www.example.com'`
9638

39+
TIP: For more information on using the `make:addon` command to create new add-on, reference [Getting Started](development/addon-development-overview.md#getting-started) in the Building An Add-On section of the docs.

docs/cli/built-in-commands/make-command.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ Command Generator -- Creates a new CLI command for an add-on
2424
### Generating a command:
2525

2626
`php eecli.php make:command "Awesome CLI Command" --addon=my_example_addon --description='This command is awesome' --signature='my_addon:awesome-example'`
27+
28+
TIP: For more information on using the `make:command` command to create new CLI command with your add-on, reference [Adding CLI Commands](cli/creating-a-command.md).

docs/cli/built-in-commands/make-extension-hook.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ Extension Hook Generator -- Implements an EE extension hook in an add-on
1515
### Implementing the sessions_start extension hook:
1616

1717
`php eecli.php make:extension-hook sessions_start --addon=my_existing_addon`
18+
19+
TIP: For more information on using the `make:extension-hook` command to create new action, reference [Extending The Core](development/extensions.md).

docs/cli/built-in-commands/make-prolet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ Prolet Generator -- Creates a new prolet for an add-on
2828
### Generating a prolet:
2929

3030
`php eecli.php make:prolet MyNewProlet --addon=my_addon --description="This is my prolet description"`
31+
32+
TIP: For more information on using the `make:prolet` command to create new Prolet with your add-on, reference [Adding Prolets](development/prolets.md).

docs/cli/built-in-commands/make-tag.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# make:tag
1+
# make:template-tag
22

33
Tag Generator -- Creates a new tag for an add-on
44

@@ -14,4 +14,6 @@ Tag Generator -- Creates a new tag for an add-on
1414

1515
### Generating a new tag:
1616

17-
`php eecli.php make:tag MyNewTag --addon=my_existing_addon`
17+
`php eecli.php make:template-tag MyNewTag --addon=my_existing_addon`
18+
19+
TIP: For more information on using the `make:template-tag` command to create new template tag with your add-on, reference [Adding Template Tags](development/custom-template-tags.md).

docs/cli/built-in-commands/make-widget.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ Widget Generator -- Creates a new Dashboard Widget for an add-on
1616
### Generating a widget:
1717

1818
`php eecli.php make:widget MyNewWidget --addon=my_existing_addon`
19+
20+
TIP: For more information on using the `make:widget` command to create new Dashboard Widget with your add-on, reference [Adding Dashboard Widgets](development/widgets.md).

docs/cli/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Command Line Inferface (CLI)
1+
# Command Line Interface (CLI)
22

3-
The Command Line Inferface (CLI) allows a user to run system and user-generated commands in the terminal. The CLI has access to all of the ExpressionEngine resources, and can be used to update the system, clear caches, and much more.
3+
The Command Line Interface (CLI) allows a user to run system and user-generated commands in the terminal. The CLI has access to all of the ExpressionEngine resources, and can be used to update the system, clear caches, and much more.
44

55
By default the CLI is located `system/ee/eecli.php` .
66

@@ -18,7 +18,7 @@ By default the CLI is located `system/ee/eecli.php` .
1818
- [make:migration - Creates a new migration](cli/built-in-commands/make-migration.md)
1919
- [make:model - Creates a new model for an add-on](cli/built-in-commands/make-model.md)
2020
- [make:prolet - Creates a new prolet for an add-on](cli/built-in-commands/make-prolet.md)
21-
- [make:tag - Creates a new tag for an add-on](cli/built-in-commands/make-tag.md)
21+
- [make:template-tag - Creates a new tag for an add-on](cli/built-in-commands/make-tag.md)
2222
- [make:widget - Generates widgets for existing add-ons](cli/built-in-commands/make-widget.md)
2323
- Migrate
2424
- [migrate - Runs specified migrations (all, core, or add-ons)](cli/built-in-commands/migrate.md)

docs/development/extensions.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ We can give our add-on the ability to hook into the core of ExpressionEngine by
2727

2828
```
2929
$ php system/ee/eecli.php make:extension-hook
30+
Let's implement an extension hook!
31+
What hooks would you like to use? (Read more: https://docs.expressionengine.com/latest/development/extensions.html) typography_parse_type_end
32+
What add-on is the extension hook being added to? [amazing_add_on]: amazing_add_on
33+
Building Extension hook.
34+
Extension hook created successfully!
3035
3136
```
3237

@@ -47,6 +52,8 @@ amazing_add_on
4752

4853
TIP: A single add-on can interact with as many hooks as you want.
4954

55+
TIP: Extensions need to be enabled to work. When you create an extension, a migration is added which will enable the extension on install. However if you need it immediately available, you can use the `--install` or `-i` flag when creating your extension. This would look like `make:extension-hook --install`.
56+
5057
## Anatomy Of An Extension
5158
Once we've added the ability to hook into the core with our add-on, an `Extensions` folder is created. The CLI will generate a class and a respective file for each core hook we wish to use.
5259

@@ -108,16 +115,20 @@ We also know that we should be returning a string from our `process()` function.
108115

109116
Let's do something with our hook to demonstrate how this would work. We're going to continue working with the `typography_parse_type_end()` hook by replacing "e" with "EE" everywhere in our templates (because EE is amazing!)
110117

111-
Using the CLI to generate the extension hook:
118+
Using the CLI to generate the extension hook (notice the `-i` flag to immediately enable the extension hook):
112119

113120
```
114-
$ php system/ee/eecli.php make:extension-hook
121+
$ php system/ee/eecli.php make:extension-hook -i
115122
Let's implement an extension hook!
116123
What is the extension hook name? Amazing Hook
124+
What hooks would you like to use? (Read more: https://docs.expressionengine.com/latest/development/extensions.html) typography_parse_type_end
117125
What add-on is the extension hook being added to? [amazing_add_on]: amazing_add_on
118126
Building Extension hook.
119127
Extension hook created successfully!
128+
Installing extension hook...
129+
Extension hook installed!
120130
```
131+
121132
This creates our `Extensions/TypographyParseTypeEnd.php` file for us. This file will initially look like this:
122133

123134
```

0 commit comments

Comments
 (0)