private static function eventName($actionName, ResourceType $resourceType = null): string
    {
        if (!empty($resourceType)) {
            // This is an action only available for the current type
            return 'resource.'.$resourceType->getName().'.'.$actionName;
        }

        // This is an action available for all resource types
        return 'resource.'.$actionName;
    }