Skip to content

Commit fcfbb1f

Browse files
author
Andy McCormick
committed
starting grammar cleanup
1 parent f86b1e6 commit fcfbb1f

File tree

3 files changed

+45
-45
lines changed

3 files changed

+45
-45
lines changed

docs/development/add-on-update-file.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
@license https://expressionengine.com/license Licensed under Apache License, Version 2.0
88
-->
99

10-
# Add-on Update File `upd.[addon_name].php`
10+
# Add-on Update File
1111

12-
The `upd.[addon_name].php` file (commonly just called the `upd` file) is critical to ExpressionEngine knowing what to do with your add-on. Here we tell ExpressionEngine what actions to register, core hooks we want to use, database tables to update, and much more. We need to tell ExpressionEngine what to do when we install and add-on, update an add-on, and uninstall and add-on. Thankfully the CLI takes care of most of this for us.
12+
The `upd.[addon_name].php` file (commonly just called the `upd` file) is critical to ExpressionEngine knowing what to do with your add-on. Here we tell ExpressionEngine what actions to register, core hooks we want to use, database tables to update, and much more. We need to tell ExpressionEngine what to do when we install an add-on, update an add-on, and uninstall and add-on. Thankfully the CLI takes care of most of this for us.
1313

1414
## Initial Setup
1515

1616
When you first create your add-on using the [`make:addon`](/cli/built-in-commands/make-addon.md) command from the CLI, a `upd` file is created for you in the root of your add-on.
1717

18-
Here I have created an Amazing Add-on which currently has a module and has some extensions that interact with the core hooks.
18+
Here I have created an add-on called Amazing Add-on using the CLI.
1919

2020
```
2121
<?php
@@ -64,7 +64,7 @@ The first thing you will notice in our `Amazing_add_on_upd` class is a list of p
6464
```
6565

6666
## Install Your Add-On (`install()`)
67-
The CLI automatically generates our install method. This method will ensure that all extensions and actions declared above will be properly installed. If you just need to install actions and/or extensions, then you can leave this method as is. Otherwise use this section to add tabs to saved [publish layouts](), update the database, or do something else when the add-on is installed.
67+
The CLI automatically generates our install method. This method will ensure that all extensions and actions declared above will be properly installed. If you only need to install actions and/or extensions, then you can leave this method as is. Otherwise, use this section to add tabs to saved [publish layouts](), update the database, or do something else when the add-on is installed.
6868

6969

7070
| Parameter | Type | Description |
@@ -98,7 +98,7 @@ Optionally add the publish page tab fields to any saved publish layouts. This is
9898
| --------- | ------- | ------------------------------------------------ |
9999
| Returns | `Array` | Associative array of the tab name and tab fields |
100100

101-
An optional function, included only if your add-on adds a tab to the publish page. This function should return an multidimensional associative array, the top array key consisting of the tab name, followed by any field names, with each field having a variety of default settings. Note that when the fields are added to the publish page, they are namespaced to prevent variable collisions:
101+
An optional function included only if your add-on adds a tab to the publish page. This function should return a multidimensional associative array: the top array key consisting of the tab name, followed by any field names, with each field having a variety of default settings. Note that when the fields are added to the publish page, they are namespaced to prevent variable collisions:
102102

103103
function tabs()
104104
{
@@ -127,7 +127,7 @@ Be sure that you also update your [`install()` function](#adding-publish-tabs) t
127127

128128

129129
## Update Your Add-on (`update()`)
130-
The `update` method is will run code when a user installs an update to our add-on.
130+
The `update` method will run code when a user installs an update to our add-on.
131131

132132
| Parameter | Type | Description |
133133
| --------- | --------- | ------------------------------------------------------------------ |

docs/development/addon-development-overview.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
# Add-on Development Overview
1111

12-
With custom add-ons you can add new fieldtypes, features, template tags, and much more to ExpressionEngine. Here we are going to look at the different parts of an add-on and how to define just what our add-on is going to do.
12+
With custom add-ons you can add new fieldtypes, features, template tags, and much more to ExpressionEngine. Here we are going to look at different parts of an add-on, and how to define just what our add-on is going to do.
1313

14-
TIP: In this section we're explaining the parts of an add-on. No need to memorize everything though, the [CLI](/cli/intro.html) will generate all the pieces we need based on what functions we want our add-on to have.
14+
TIP: In this section, we're explaining the parts of an add-on. No need to memorize everything though, the [CLI](/cli/intro.html) will generate all the pieces we need based on what functions we want our add-on to have.
1515

1616
[TOC]
1717

@@ -21,18 +21,18 @@ While ExpressionEngine offers a lot of functionality right out of the box, somet
2121
Here are some ideas of what you can accomplish with a custom add-on:
2222

2323
- Add custom [template tags](development/custom-template-tags.md) like `{exp:amazing_add_on:member_info}`.
24-
- Run functions or return data when someone reaches a certain URL using [URL endpoints (called Actions)](development/actions.md).
24+
- Run functions or return data when someone reaches a specific URL using [URL endpoints (called Actions)](development/actions.md).
2525
- Add custom [fieldtypes](development/fieldtypes/fieldtypes.md) for content editors when creating channel entries.
2626
- Add custom [CLI commands](cli/creating-a-command.md) like `$ eecli.php amazing_add_on:do_something_amazing`
2727
- Add custom [Publish Form tabs](development/tab-files.md) to help organize entry fields for content editors.
2828
- Hook into ExpressionEngine and run [custom functions (called Extensions)](development/extensions.md) when ExpressionEngine does certain actions, like emailing your team whenever a post is created or manipulating text when a template is rendered.
29-
- Display information from from your add-on to content editors on the front-end by adding a [Prolet](/development/prolets.md) to the [ExpressionEngine Dock](/advanced-usage/front-end/dock.md).
29+
- Display information from your add-on to content editors on the front-end by adding a [Prolet](/development/prolets.md) to the [ExpressionEngine Dock](/advanced-usage/front-end/dock.md).
3030
- Display information in the [Control Panel Dashboard](/control-panel/dashboard_management.md) using a [custom Dashboard Widget](/development/widgets.md).
3131

3232
These are just a few ideas of what you can do with custom add-ons. The possibilities are almost endless.
3333

3434
## Getting Started
35-
Getting started making your own add-on is incredibly easy with the CLI. To begin making an add-on simply use the `make:addon` command from the [CLI](/cli/intro.html).
35+
Getting started making an add-on is incredibly easy with the CLI. To begin making an add-on simply, use the `make:addon` command from the [CLI](/cli/intro.html).
3636

3737
```
3838
$ php system/ee/eecli.php make:addon
@@ -64,26 +64,26 @@ amazing_add_on/
6464
┗ upd.amazing_add_on.php
6565
```
6666

67-
This is the starting point of an add-on and is enough to begin creating template tags, extension hooks, and much more! From here you can add more functionality to your add-on depending on your needs.
67+
This is the starting point of an add-on and is enough to begin creating template tags, extension hooks, and much more! From here, you can add more functionality to your add-on depending on your needs.
6868

69-
Here's a list of functionality that can be added to your add-on:
69+
Here's a list of functionality that can be added to your add-on and the corresponding CLI command if applicable:
7070

71-
- [Extension hooks](development/extensions.md)
72-
- [Control Panel Pages](development/modules.md)
73-
- [Actions](development/actions.md)
74-
- [Fieldtypes](development/fieldtypes/fieldtypes.md)
75-
- [CLI Commands](cli/creating-a-command.md)
76-
- [Template Tags](development/custom-template-tags.md)
71+
- [Extension hooks (`make:extension-hook`)](development/extensions.md)
72+
- [Control Panel Pages (`make:mcp-route`)](development/modules.md)
73+
- [Actions (`make:action`)](development/actions.md)
74+
- [Fieldtypes (`make:fieldtype`)](development/fieldtypes/fieldtypes.md)
75+
- [CLI Commands (`make:command`)](cli/creating-a-command.md)
76+
- [Template Tags (`make:template-tag`)](development/custom-template-tags.md)
7777
- [Language Files](development/add-on-language-files.md)
7878
- [Publish Form Tabs](development/tab-files.md)
79-
- [Prolets](development/prolets.md)
80-
- [Dashboard Widgets](development/widgets.md)
79+
- [Prolets (`make:prolet`)](development/prolets.md)
80+
- [Dashboard Widgets (`make:widget`)](development/widgets.md)
8181

8282
Continue reading below to understand all the files and folders found in the structure of an add-on.
8383

8484
## Add-On Structure
8585

86-
Below is the complete structure of an add-on that we'll call "Amazing Add-on". There's a lot in this structure, because this add-on can do a lot of things (it's amazing 😀)! Don't worry though, your add-on can be as simple or complex as you want to make it. This example just shows all the possibilities. Continue reading as we break down the parts of this add-on.
86+
Below is the complete structure of an add-on that we'll call "Amazing Add-on". There's a lot in this structure because this add-on can do many things (it's amazing 😀)! Don't worry though; your add-on can be as simple or complex as you want to make it. This example just shows all the possibilities. Continue reading as we break down the parts of this add-on.
8787

8888
```
8989
amazing_add_on
@@ -126,17 +126,17 @@ amazing_add_on
126126
┗ upd.amazing_add_on.php
127127
```
128128

129-
NOTE: **Note:** Pay attention to how these filenames are structured. For filenames, hyphens and special characters are removed and spaces are replaced with underscores.
129+
NOTE: **Note:** Pay attention to how these filenames are structured. For filenames, hyphens and special characters are removed, and spaces are replaced with underscores.
130130

131131

132132
### The Add-on Setup File (`addon.setup.php`)
133-
Starting with version 3.0 each add-on in ExpressionEngine must have an `addon.setup.php` file in its package directory. This file provides descriptive data about a specific add-on such as author, name, and version.
134-
Reference the [The Add-on Setup File](development/addon-setup-php-file.md) for more information on the contents of this file.
133+
Starting with version 3.0 each add-on in ExpressionEngine must have an `addon.setup.php` file in its package directory. This file provides descriptive data about a specific add-on, such as author, name, and version.
134+
Reference [The Add-on Setup File](development/addon-setup-php-file.md) for more information on the contents of this file.
135135

136136
### The Update File (`upd.[addon_name].php`)
137137
**class `Add_on_name_upd extends Installer`**
138138
The Update file for an add-on includes a class with a name that is a combination of the add-on's name with a `_upd` suffix. Here you define functionality that should be executed on installation, update, and uninstallation of your add-on.
139-
Reference the [The Add-on Update File](development/add-on-update-file.md) for more information on this file.
139+
Reference [The Add-on Update File](development/add-on-update-file.md) for more information on this file.
140140

141141

142142
### The Extension File (`ext.[addon_name].php`)
@@ -151,54 +151,54 @@ Reference [Adding Fieldtypes](development/fieldtypes/fieldtypes.md) for more inf
151151

152152
### The Mcp File (`mcp.[addon_name].php`)
153153
**class `Add_on_name_upd extends Mcp`**
154-
The Mcp file is used to route ExpressionEngine to our `Mcp` Folder which contains logic for your Control Panel pages (settings or other pages you might want to add to the Control Panel for your users to interact with).
154+
The Mcp file is used to route ExpressionEngine to our `Mcp` Folder, which contains logic for your Control Panel pages (settings or other pages you might want to add to the Control Panel for your users to interact with).
155155
Reference [Adding Control Panel Pages](development/modules.md) for more information on adding Control Panel pages with your add-on.
156156

157157
### The Module File `mod.[addon_name].php`
158158
**class `Add_on_name_upd extends Module`**
159-
The module file is used to route ExpressionEngine to our `Modules` Folder which contains any actions or template tags you are adding with your add-on.
159+
The module file is used to route ExpressionEngine to our `Modules` Folder, which contains any actions or template tags you are adding with your add-on.
160160
Reference [Adding Template Tags](development/custom-template-tags.md) for more information on adding template tags with your add-on or [Adding Actions](development/actions.md) for more information on creating URL endpoints (actions) with your add-on.
161161

162162
### The Tab File (`tab.[addon_name].php`)
163163
**class `Module_name_tab`**
164-
The tab file is used to create tabs which are visible on in [Publish Layouts](control-panel/channels.md#publish-layouts). Respectivley these tabs would also be visible on the Entry Publish/Edit page if selected in the publish layout.
164+
The tab file is used to create tabs that are visible in [Publish Layouts](control-panel/channels.md#publish-layouts). Respectively, these tabs would also be visible on the Entry Publish/Edit page if selected in the publish layout.
165165
Reference [Adding Publish Form Tabs](development/tab-files.md) for more information on adding Publish Form Tabs with your add-on.
166166

167167
### The Prolet File `pro.[addon_name].php`
168168
**class `Add_on_name_upd extends AbstractProlet implements ProletInterface`**
169-
The prolet file is used to create new [Prolets](/development/prolets.md) with our add-on.
169+
The Prolet file is used to create new [Prolets](/development/prolets.md) with our add-on.
170170
Reference [Adding Prolets](development/prolets.md) for more information on adding prolets to your add-on.
171171

172172
### The Add-on Icon File `icon.svg`
173173
The add-on icon folder is used both in the Add-on Manager and in the Dock on the front-end to distinguish your add-on from others.
174174

175175
### `/Extensions`
176-
When we tell the CLI that we want to create an extension, classes are automatically created in the `Extensions` folder along with the above mentioned `ext.[addon_name].php` file. Interacting with hooks allow us to extend ExpressionEngine's functionality, thus we refer to these as "extensions".
176+
When we tell the CLI that we want to create an extension, classes are automatically created in the `Extensions` folder along with the above mentioned `ext.[addon_name].php` file. Interacting with hooks allows us to extend ExpressionEngine's functionality, thus we refer to these as "extensions".
177177

178178
TIP: Reference the [Extensions](development/extensions.md) section of the docs for more information on using extensions in your add-on.
179179

180180
### `Module/Actions`
181-
The `Module/Actions` folder stores all the business logic for any actions that we are adding to ExpressionEngine with our add-on. Each action will have a separate file and corresponding class created based information provided in the `$actions` array in the `upd` file.
181+
The `Module/Actions` folder stores all the business logic for any actions that we are adding to ExpressionEngine with our add-on. Each action will have a separate file and corresponding class created based on information provided in the `$actions` array in the `upd` file.
182182

183183
### `Module/Tags`
184-
The `Module/Tags` folder stores all the business logic for any template tags we are creating with our add-on.
184+
The `Module/Tags` folder stores all the business logic for any template tags we create with our add-on.
185185

186186
### `/views`
187-
The `views` folder contains all of our control panel views which will be used to actuall render our add-on's control panel pages.
187+
The `views` folder contains all of our Control Panel views which will be used to render our add-on's control panel pages.
188188

189189
### `/language`
190-
The `language` folder contains all of our lang files that will be used to display text on a page in whatever language is selected in the user’s account settings.
190+
The `language` folder contains all of our language files that will be used to display text on a page in whatever language is selected in the user’s account settings.
191191

192192
### `/database/migrations`
193-
The `/database/migrations` folder holds all migrations that will be ran on installation or updating of our add-on. Using the CLI, migrations can also be ran indepentantly.
193+
The `/database/migrations` folder holds all migrations that will be ran on installation or updating of our add-on. Using the CLI, migrations can also be ran independently.
194194

195195
### `Model`
196196
The `Model` folder holds all models that we are creating with our add-on.
197197

198198
### `widgets`
199-
The `widgets` folder holds all dashboard widgets that we are creating with our add-on.
199+
The `widgets` folder holds all dashboard widgets we create with our add-on.
200200

201201
## A Word About Legacy Add-On Development
202-
In the past, add-ons were often categorized based on their functionality. We identified our add-on to ExpressionEngine as a fieldtype, extension, module, or plug-in. Thus there was never a clear process to of how to structure one add-on that was all these categories in one. With the release of 6.4.x and 7.2.x this has been updated. The CLI has been updated to make creating add-ons and adding functionality incredibly easy, while the docs have also been updated to reflect the ideal workflow of creating an add-on.
202+
In the past, add-ons were often categorized based on their functionality. We identified our add-on to ExpressionEngine as a fieldtype, extension, module, or plug-in. Thus there was never a straightforward process on structuring one add-on that contained all these categories in one. With the release of 6.4.x and 7.2.x this has been updated. The CLI has been updated to make creating add-ons and adding functionality incredibly easy. At the same time, the docs have also been updated to reflect the ideal workflow of creating an add-on.
203203

204-
While the latest changes shift our view of add-ons and how developers will create add-ons, you may still come across add-ons using the old methodology. We have left much of the old methods and structure in place so that older add-ons will continue to work. However, we are choosing not actively update the documentation for the old methods because we feel it's no longer in the best interest of the community to develop add-ons in this way. If you need to access how the docs once were regarding add-ons add-ons, you can reference the [legacy docs in GitHub](https://github.com/ExpressionEngine/ExpressionEngine-User-Guide/releases/tag/legacy-add-on-structure).
204+
While the latest changes shift our view of add-ons and how developers will create add-ons, you may still come across add-ons using the old methodology. We have left much of the old methods and structure in place so that older add-ons will continue to work. However, we are choosing to not actively update the documentation for the old methods because we feel it's no longer in the best interest of the community to develop add-ons in this way. If you need to access how the docs once were regarding add-ons, you can reference the [legacy docs in GitHub](https://github.com/ExpressionEngine/ExpressionEngine-User-Guide/releases/tag/legacy-add-on-structure) (note that v7 and v6 were the same in these regards).

0 commit comments

Comments
 (0)