X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FAPI%2FProvider%2FReflectionProvider.php;h=ac432b8fa310ce8b260e9ef9c602f83e3490fe33;hb=ca5fb3d15ba89ea5d6002735420f3e5238ebb4d5;hp=514b8469312592e879b06028992195b4cf2d561c;hpb=6842e722468feb7ad6e36b8aaf728fbf8f221be9;p=civicrm-core.git diff --git a/Civi/API/Provider/ReflectionProvider.php b/Civi/API/Provider/ReflectionProvider.php index 514b846931..ac432b8fa3 100644 --- a/Civi/API/Provider/ReflectionProvider.php +++ b/Civi/API/Provider/ReflectionProvider.php @@ -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['*']; } }