Skip to content
Snippets Groups Projects
Commit 396abd57 authored by Seamus Lee's avatar Seamus Lee
Browse files

Reorder extensions files and rename to be extension structure to be clear its...

Reorder extensions files and rename to be extension structure to be clear its more than just files its directory strcutre and improve doc a bit
parent eb050b1d
Branches
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ civix generate:module com.example.myextension --license=AGPL-3.0
```
This command will report that it has created three files, following the
[standard extension structure](/extensions/files.md).
[standard extension structure](/extensions/structure.md).
The command attempts to auto-detect authorship information (your name and
email address) by reading your
......
# Extension files
# Extension Structure
## Extension Files
The [civix](/extensions/civix.md) command line tool will generate the following structure
for you:
- ***info.xml*** is a manifest that describes your extension – the
name, license, version number, etc. You should edit most information
in this file.
in this file. The information contained in this file will also be used if published on civicrm.org
- ***myextension.php*** stores source code for all your hooks. It
includes a few default hook implementations which will make
development easier. You can add and remove hooks as you wish. (Note:
......@@ -16,11 +17,17 @@ for you:
module in the template include-path. `civix` may automatically
overwrite this file, so generally do not edit it.
In addition, it creates some empty directories. These directories are
## Extension Directory Structure
In addition, civix creates some empty directories. These directories are
reminiscent of the directory structure in CiviCRM core:
- ***CRM/Myextension/*** stores PHP class files. Classes in this
folder should be prefixed with "CRM\_Myextension\_"
- ***templates/*** stores Smarty templates
- ***xml/*** stores XML configuration files (such as URL routes)
- ***templates/*** stores Smarty templates.
- ***xml/*** stores XML configuration files (such as URL routes and schema xml)
- ***build/*** stores exportable .zip files
When adding files into these directories it is advisable to follow similar patterns to that in CiviCRM Core
e.g. BAO files should go in "CRM\_Myextension\BAO\", likewise with Form and Page. This ensures that for developers
that seek to modify or improve the extension files can be found in standard locations.
......@@ -31,6 +31,7 @@ pages:
- Extensions Development:
- Basics: extensions/index.md
- civix: extensions/civix.md
- Extension Structure: extensions/structure.md
# Creating Pages: extensions/create-page.md
# Storing Configuration: extensions/config.md
# Storing Data: extensions/storing-data.md
......@@ -215,7 +216,6 @@ pages:
- Markdown: documentation/markdown.md
- Style Guide: documentation/style-guide.md
- Content to reorganize:
- Extensions files: extensions/files.md
- Requirements: requirements.md
- Develop: develop.md
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment