arckinteractive / notifications_sms
Elgg 的 SMS 通知 API
1.1.0
2019-08-09 10:33 UTC
Requires
- php: >=5.5
- composer/installers: ~1.0
This package is auto-updated.
Last update: 2024-09-09 21:53:03 UTC
README
功能
- API 用于将 Elgg 通知与 SMS 提供商集成
注意
发送
插件不会发送实际的 SMS 消息。提供者插件必须注册 'send', 'sms'
钩子并使用提供者 API 来派发消息。钩子将接收 to
电话号码和 text
作为参数。
要发送 SMS,请使用 notifications_sms_send()
。
即时通知
要提供用于即时通知的自定义 SMS 文本,传递带有参数的 sms
notify_user($user->guid, elgg_get_site_entity()->guid, 'Really long notification subject', 'Really long notification body', array( 'sms' => 'Send this sms', ), 'email');
订阅通知
要提供与 summary
不同的自定义 SMS 文本用于订阅通知,请在 prepare
钩子中设置 \Elgg\Notifications\Notification
实例的 sms
属性。