phpstorm - Allow manual override of data folder
authorTim Otten <totten@civicrm.org>
Fri, 1 Sep 2023 01:04:58 +0000 (18:04 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 1 Sep 2023 01:04:58 +0000 (18:04 -0700)
tools/extensions/phpstorm/phpstorm.php

index 9e12439452700143ee5cbd194101d82783993f56..b03389470f7221c329e6b19b2e6c4878246598f9 100644 (file)
@@ -32,10 +32,13 @@ function phpstorm_metadata_dir(): ?string {
 }
 
 function _phpstorm_metadata_dirs(): array {
-  return [
-    E::path('.phpstorm.meta.php'),
-    \Civi::paths()->getPath('[civicrm.files]/.phpstorm.meta.php'),
-  ];
+  $dirs = [];
+  if (CRM_Utils_Constant::value('CIVICRM_PHPSTORM_METADATA')) {
+    $dirs[] = CRM_Utils_Constant::value('CIVICRM_PHPSTORM_METADATA');
+  }
+  $dirs[] = E::path('.phpstorm.meta.php');
+  $dirs[] = \Civi::paths()->getPath('[civicrm.files]/.phpstorm.meta.php');
+  return $dirs;
 }
 
 /**