Search for entity-specific actions in core
authorcolemanw <coleman@civicrm.org>
Sun, 15 Sep 2019 14:23:27 +0000 (10:23 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 17 Sep 2019 03:11:24 +0000 (23:11 -0400)
Civi/Api4/Action/GetActions.php

index 67da925b86d00688fd7a8ecf4edb4c8ea37748e8..40d148014a566950d42f8ca35f322df1e43b2506 100644 (file)
@@ -27,11 +27,13 @@ class GetActions extends BasicGetAction {
       }
     }
     if (!$this->_actionsToGet || count($this->_actionsToGet) > count($this->_actions)) {
-      // Search entity-specific actions (including those provided by extensions)
+      // Search for entity-specific actions in extensions
       foreach (\CRM_Extension_System::singleton()->getMapper()->getActiveModuleFiles() as $ext) {
         $dir = \CRM_Utils_File::addTrailingSlash(dirname($ext['filePath']));
         $this->scanDir($dir . 'Civi/Api4/Action/' . $this->_entityName);
       }
+      // Search for entity-specific actions in core
+      $this->scanDir(\CRM_Utils_File::addTrailingSlash(__DIR__) . $this->_entityName);
     }
     ksort($this->_actions);
     return $this->_actions;