New answers tagged


You can also do it with a query. Obviously it is better to do it with the API but as explained above it takes a while.... $query = "SELECT COUNT(*) FROM civicrm_extension WHERE full_name = %1 AND is_active = TRUE"; $countExt = CRM_Core_DAO::singleValueQuery($query, [1 => ["aah", "String"]]);


The following will return an array keyed by the long extension 'key', whose values are one of installed uninstalled disabled (or, less commonly, unknown, installed-missing, disabled-missing) <?php $list = CRM_Extension_System::singleton()->getManager()->getStatuses(); You can find enabled ones with: <?php $list = array_keys(preg_grep('/^...


To answer my own question: Civi::lockManager is expected to be used in a way that will allow one process to acquire a lock (with Civi::lockManager()->acquire()) such that any other process will be made to wait until the first process has released the lock (either explicitly with Civi::lockManager()->release(), or simply by completing script execution ...

Top 50 recent answers are included