From 639c5b84671b6798e4eb61e8e9e37073c5d07336 Mon Sep 17 00:00:00 2001 From: Sean Madsen <sean@seanmadsen.com> Date: Mon, 2 Apr 2018 13:45:14 -0400 Subject: [PATCH] Verify _myextension_civix_civicrm_entityTypes --- docs/extensions/civix.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/extensions/civix.md b/docs/extensions/civix.md index a837236b..11b6c971 100644 --- a/docs/extensions/civix.md +++ b/docs/extensions/civix.md @@ -156,6 +156,25 @@ If you want your extension to store data in the database, then you will need to Even though you're not yet creating any upgrades for your extension, you need to do this step now so that CiviCRM will pick up `auto_install.sql` and `auto_uninstall.sql` later on. +1. Check your `myextension.php` file to ensure that it's using the civix-generated `hook_civicrm_entityTypes` implementation. Look for code like this: + + ```php + /** + * Implements hook_civicrm_entityTypes(). + * + * Declare entity types provided by this module. + * + * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_entityTypes + */ + function myextension_civicrm_entityTypes(&$entityTypes) { + _myextension_civix_civicrm_entityTypes($entityTypes); + } + ``` + + Starting from `civix` v18.02.0, this hook is automatically added when you generate a new extension. + + But if you began your extension before v18.02.0 then you'll need to manually implement this hook by adding the code above (and changing `myextension` to your extension's short name). + 1. Re-install your extension. ```bash -- GitLab