I am working with CiviCRM 5.59.3, and a drupal module that integrates with CiviCase. How can I check if the CiviCRM component is enabled and enable it if it is disabled? I need to do this with php.
1 Answer
Calling CRM_Core_BAO_ConfigSetting::enableComponent("CiviCase");
will enable it if not enabled already.
-
Hi @Binary Alchemist, the way stackexchange displays review+edit comments is bizarre. I saw your suggested edit, and accepted part of it but not the addition of the extra
if
check because the function won't do anything if it's already enabled.– DemeritCommented Mar 28, 2023 at 2:34