获取单个邮件模板
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\EmailTemplateModel::indexEmailTemplate |
| 所属业务 | 消息通知 |
| 来源模块/系统 | 邮件模板模型 |
功能说明
获取单个邮件模板
调用示例
$id = 1;
$result = (new \app\common\model\EmailTemplateModel())->indexEmailTemplate($id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 是 | — | required | 邮件模板ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
id | int | 邮件模板ID |
name | string | 名称 |
subject | string | 标题 |
message | string | 内容 |
notice_setting_name | string | 默认动作名称 |
正常返回
{
"id": 1,
"name": "示例名称",
"subject": "string",
"message": "string",
"notice_setting_name": "示例名称"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |