diff --git a/docs/extend.md b/docs/extend.md index 5d94df177c93e5794f5a57a56257fb86f93a792c..ca1c5e05d88c39af897637c4450993df7723304f 100644 --- a/docs/extend.md +++ b/docs/extend.md @@ -1,17 +1,8 @@ # Creating CiviCRM Extensions -**CiviCRM Extensions** are packaged pieces of functionality that extend -CiviCRM's out-of-the-box functionality, independent of CMS plaform. - -This section covers writing extensions, submitting extensions to the public -extensions directory, and the review process for extensions submitted to the -directory. +This page is moving. See [writing extensions](/extensions/basics). +<!-- TODO: - -- General overview: Use APIv3 and hooks. Package code in Civi extensions or CMS extensions (w/trade-offs). -- Assimilate: http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension -- Assimilate: http://wiki.civicrm.org/confluence/display/CRMDOC/Publish+an+Extension -- Assimilate: https://wiki.civicrm.org/confluence/display/CRMDOC/Extension+Review -- Create a CiviCRM extension developer's guide to best practices (Nicolas?) -- Reference this page from the wiki and also https://civicrm.org/extensions (in the header). +- delete this page after redirection in place +--> diff --git a/docs/extensions/basics.md b/docs/extensions/basics.md new file mode 100644 index 0000000000000000000000000000000000000000..6997c2d1629d0bf17e34cba8d0b6980a0fd4c116 --- /dev/null +++ b/docs/extensions/basics.md @@ -0,0 +1,62 @@ +# Writing Extensions + +Todo: + +- Use APIv3 and hooks. Package code in Civi extensions or CMS extensions (w/trade-offs). +- Create a CiviCRM extension developer's guide to best practices (Nicolas?) + +## Introduction + +**CiviCRM Extensions** are packaged pieces of functionality that extend +CiviCRM's out-of-the-box functionality, independent of CMS plaform. + +This section covers how to write extensions. See the [extension life cycle +page](/extend-stages) for background on the publishing and review process for +[published extensions](https://civicrm.org/extensions). + +## General overview + +If you haven't already, you need to configure a local directory to store +extensions. +For instructions, see +[Extensions](https://wiki.civicrm.org/confluence/display/CRMDOC/Extensions) +You may also want to review the +[Extension Reference](https://wiki.civicrm.org/confluence/display/CRMDOC/Extension+Reference) page for technical details. + +### 0. Decide +Writing an extension is a great way to implement a new feature – but it may be +unnecessary if someone else has already implemented that feature. If you're not +sure, you can do a couple things: +- Search the [Extensions Directory](http://civicrm.org/extensions) for an existing extension. +- Post about your planned extension in the [Extensions Channel](https://chat.civicrm.org/civicrm/channels/extensions). + +Extensions provide a native, portable way to extend CiviCRM, but there are +other ways to extend CiviCRM – such as implementing Drupal modules or Joomla +plugins. If you're considering another way, look at the +[Add-on Formats](https://wiki.civicrm.org/confluence/display/CRMDOC/Add-on+Formats) +to help decide. + +### 1. Install civix +Some tasks in the process of writing an extension require boiler-plate code. To +reduce the amount of work required to find, understand, and adapt the +boiler-plate code, one should install the CiviCRM extension builder, civix. +Civix is a command-line tool which generates code for some common development +tasks. + +>> See [https://github.com/totten/civix/](https://github.com/totten/civix/) + +### 2. Develop +To get started with development, one should usually follow the steps in +"[Create a Module +Extension.](https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension)" +A module extension is the most flexible type of extension – it can define any +mix of new reports, custom search screens, payment processors, and web pages; +it can listen for hooks, override page-templates, and more. The coding +conventions closely resemble those of CiviCRM Core and of CiviCRM-Drupal +modules. Module extensions are fully supported in CiviCRM 4.2+. + +### 3. Publish +The CiviCRM Extensions Directory provides a way to publicize your extension – +and it even provides easy, in-app distribution. + +See: [Publish](http://wiki.civicrm.org/confluence/display/CRMDOC/Publish+an+Extension), diff --git a/docs/extensions/civix.md b/docs/extensions/civix.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/civix.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/config.md b/docs/extensions/config.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/config.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/create-page.md b/docs/extensions/create-page.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/create-page.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/custom-api.md b/docs/extensions/custom-api.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/custom-api.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/custom-reports.md b/docs/extensions/custom-reports.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/custom-reports.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/custom-searches.md b/docs/extensions/custom-searches.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/custom-searches.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/customize-screens.md b/docs/extensions/customize-screens.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/customize-screens.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/files.md b/docs/extensions/files.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/files.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/payment-processor.md b/docs/extensions/payment-processor.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/payment-processor.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/permissions.md b/docs/extensions/permissions.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/permissions.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/storing-data.md b/docs/extensions/storing-data.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/storing-data.md @@ -0,0 +1 @@ +Coming soon! diff --git a/docs/extensions/using-hooks.md b/docs/extensions/using-hooks.md new file mode 100644 index 0000000000000000000000000000000000000000..6863c09819bc0daadc3a33b2d746606cf5e36710 --- /dev/null +++ b/docs/extensions/using-hooks.md @@ -0,0 +1 @@ +Coming soon! diff --git a/mkdocs.yml b/mkdocs.yml index 594a524da895f439169759f5bebe15d1edccfafa..d6af3027ab3650c83f4e3265824e2b6b92309bb0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,6 +23,20 @@ pages: - Hooks: - How to Use Hooks: hook.md - All Available Hooks: hooks-db.md +- Writing Extensions: + - Basics: extensions/basics.md +# - civix: extensions/civix.md +# - Anatomy of Files: extensions/files.md +# - Using hooks: extensions/using-hooks.md +# - Customizing Screens: extensions/customize-screens.md +# - Creating Pages: Forms/extensions/create-page.md +# - Storing Configuration: extensions/config.md +# - Storing Data: extensions/storing-data.md +# - Setting Permissions: extensions/permissions.md +# - Custom API Functions: extensions/custom-api.md +# - Custom Reports: extensions/custom-reports.md +# - Custom Searches: extensions/custom-searches.md +# - Payment Processors: extensions/payment-processor.md - Miscellaneous: - Extension Lifecycle: extend-stages.md - Markdown: markdownrules.md diff --git a/redirects/wiki-crmdoc.txt b/redirects/wiki-crmdoc.txt index 25d30ae87355bdba36dc66e601229ec238218c92..65ceb22dfbb6b8a224bfd65089dde699d241954b 100644 --- a/redirects/wiki-crmdoc.txt +++ b/redirects/wiki-crmdoc.txt @@ -1,2 +1,3 @@ Documentation+Infrastructure+Canary develop -The+developer+community basics/community \ No newline at end of file +The+developer+community basics/community +Create+an+Extension extensions/basics \ No newline at end of file