/** * Make sure all the data structures are there when the module is enabled */ public function enable() { // create snapshot database tables $this->executeSqlFile('sql/donrec.sql', true); // create/update custom groups CRM_Donrec_DataStructure::update(); // rename the custom fields according to l10. // FIXME: this is a workaround: if you do this before, the table name change, // BUT we should not be working with static table names CRM_Donrec_DataStructure::translateCustomGroups(); // make sure the template is there CRM_Donrec_Logic_Template::getDefaultTemplateID(); }