CiviCRM: Difference between revisions
No edit summary |
use Subpages template |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
{{#ev:vimeo|192125770}} | {{#ev:vimeo|192125770}} | ||
{{Subpages|}} | |||
{{ | |||
== Documentation == | == Documentation == | ||
| Line 55: | Line 53: | ||
== Upgrading == | == Upgrading == | ||
[[{{PAGENAMEE}}/upgrade]] | |||
== Debugging and the CV command-line == | |||
If you have your CiviCRM sending errors to the Drupal Watchdog Log (CiviCRM Administer > System Settings > [https://equality-tech.com/civicrm/admin/setting/debug?reset=1 Debugging and Error Handling]), you can simply navigate to it in the Drupal Admin (Reports > [https://equality-tech.com/admin/reports/dblog Recent log messages]) | If you have your CiviCRM sending errors to the Drupal Watchdog Log (CiviCRM Administer > System Settings > [https://equality-tech.com/civicrm/admin/setting/debug?reset=1 Debugging and Error Handling]), you can simply navigate to it in the Drupal Admin (Reports > [https://equality-tech.com/admin/reports/dblog Recent log messages]) | ||
| Line 147: | Line 132: | ||
You can create your own tokens by implementing <code>hook_civicrm_tokens()</code> and <code>hook_civicrm_tokenValues()</code>. See | You can create your own tokens by implementing <code>hook_civicrm_tokens()</code> and <code>hook_civicrm_tokenValues()</code>. See | ||
< | <syntaxhighlight lang="php"> | ||
<?php | <?php | ||
/** | /** | ||
| Line 305: | Line 290: | ||
} | } | ||
} | } | ||
</ | </syntaxhighlight> | ||
* [https://civicrm.stackexchange.com/questions/2558/tokens-for-custom-field-set-with-multiple-records?rq=1 Stack Exchange] | * [https://civicrm.stackexchange.com/questions/2558/tokens-for-custom-field-set-with-multiple-records?rq=1 Stack Exchange] | ||
| Line 360: | Line 345: | ||
== Database == | == Database == | ||
The database code in CiviCRM is divided into two logical sections: the DAO and the BAO. The BAO holds the "business logic" for objects and extends the DAO. The DAO is concerned with data to/from the database backend and it's definition (object to relational database mapping, aka "[[wp:Object-relational mapping|ORM]]"). Both are an extension of the [https://pear.php.net/manual/en/package.database.db-dataobject.php PEAR DB DataObject] class. As of August 2015, this is true and [https://civicrm.org/node/95 this blog post from 2006] gives some more (early) background. | The database code in CiviCRM is divided into two logical sections: the DAO and the BAO. The BAO holds the "business logic" for objects and extends the DAO. The DAO is concerned with data to/from the database backend and it's definition (object to relational database mapping, aka "[[wp:Object-relational mapping|ORM]]"). Both are an extension of the [https://pear.php.net/manual/en/package.database.db-dataobject.php PEAR DB DataObject] class. As of August 2015, this is true and [https://civicrm.org/node/95 this blog post from 2006] gives some more (early) background. | ||
< | <syntaxhighlight lang="php"> | ||
// from CRM/core/DAO.php | // from CRM/core/DAO.php | ||
| Line 366: | Line 351: | ||
require_once 'DB/DataObject.php' | require_once 'DB/DataObject.php' | ||
class CRM_Core_DAO extends DB_DataObject | class CRM_Core_DAO extends DB_DataObject | ||
</ | </syntaxhighlight> | ||
In 2009, [https://civicrm.org/node/597 Doctrine was proposed] as a OODB approach instead of an ORM. There are [https://civicrm.org/blogs/dharmatech/data-mapper-pattern-civicrm-architecture-proposal other discussions too] in the "Architecture Series" that are worth reviewing if you want to know more about database development in CiviCRM. | In 2009, [https://civicrm.org/node/597 Doctrine was proposed] as a OODB approach instead of an ORM. There are [https://civicrm.org/blogs/dharmatech/data-mapper-pattern-civicrm-architecture-proposal other discussions too] in the "Architecture Series" that are worth reviewing if you want to know more about database development in CiviCRM. | ||