模块默认显示
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\logic\ModuleLogic::moduleDefaultView |
| 所属业务 | 公共接口 |
| 来源模块/系统 | 模块逻辑 |
功能说明
模块默认显示,自动使用主题
调用示例
$param = [['module' => 'string', 'template_dir' => 'string', 'file' => 'string']];
$result = (new \app\common\logic\ModuleLogic())->moduleDefaultView($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param | array | 否 | — | — | 参数 |
param.module | string | 是 | — | require | 模块标识 |
param.template_dir | string | 是 | — | require | 模板路径(clientarea=会员中心,cart=购物车) |
param.file | string | 是 | — | require | 主题下文件名,如product_detail.html |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
返回值 | array | — |
template | string | 模板路径 |
正常返回
{
"template": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |