Introduction
This manual contains developer documentation for working with CiviCRM. It is intended as a warm up for developers. It is aimed at both experienced developers who need to know their way around CiviCRM and experienced CiviCRM users who want to extend their skills and customise their systems further. Organizations that want to ensure that their developers are using best practices to extend CiviCRM may also find it useful.
We hope it will help you and encourage you to engage with the CiviCRM community.
Configuring, customising and extending
CiviCRM is very flexible. It aims to cater to the majority of non-profit needs through its many configuration options. When you reach the limit of configuration, it is time to start customising and extending. In this manual when we use the word configure, we are referring to something that you can do via the user interface. When we use the words customise and extend, we are referring to writing code.
It is important to remember that there are many techniques (adding fields, profiles, components, Drupal modules and Joomla! extensions) that can be used to configure CiviCRM without writing a line of code. To get the most out of CiviCRM through these techniques, and to avoid unnecessary coding, we recommend you read the CiviCRM user manual and consult with the community before starting any coding project.
Once you are sure that what you want to do cannot be achieved through the user interface, it is time to start writing custom code. So read this manual - it is written for you!
Some of the more popular ways to code with CiviCRM are:- Edit the templates. This technique is useful to change the layout of forms, and to add more data or features via AJAX.
- Write code that implement hooks. Hooks are called at specific points in the code as users interact with CiviCRM and are useful in many different circumstances, for example
- to change the default behaviour when you create, update or delete an entity
- create a new custom mail merge token
- populate a custom field automatically based on your own business logic.
- Write and package an extension. Useful as a technique to add a custom search, report, payment processors, etc.
- Override and/or patch existing code. Small changes and improvements to the way in which CiviCRM works can be achieved by editing the existing code. You should definitely chat with the developer community before embarking on any code that changes existing code and you should submit a patch to CiviCRM if the code will benefit others.
- Write a new CiviCRM component. This is a major undertaking and only recommended for the seasoned CviCRM developer. You'll definitely want to discuss and collaborate with other CiviCRM developers if this is the path you choose.