Merge pull request #17143 from mattwire/donthidedisabledmemberships
[civicrm-core.git] / Civi / API / Provider / ReflectionProvider.php
index 514b8469312592e879b06028992195b4cf2d561c..ac432b8fa310ce8b260e9ef9c602f83e3490fe33 100644 (file)
@@ -24,11 +24,11 @@ class ReflectionProvider implements EventSubscriberInterface, ProviderInterface
    */
   public static function getSubscribedEvents() {
     return [
-      Events::RESOLVE => [
+      'civi.api.resolve' => [
         // TODO decide if we really want to override others
         ['onApiResolve', Events::W_EARLY],
       ],
-      Events::AUTHORIZE => [
+      'civi.api.authorize' => [
         // TODO decide if we really want to override others
         ['onApiAuthorize', Events::W_EARLY],
       ],
@@ -134,7 +134,7 @@ class ReflectionProvider implements EventSubscriberInterface, ProviderInterface
    */
   public function getActionNames($version, $entity) {
     $entity = _civicrm_api_get_camel_name($entity, $version);
-    return isset($this->actions[$entity]) ? $this->actions[$entity] : $this->actions['*'];
+    return $this->actions[$entity] ?? $this->actions['*'];
   }
 
 }