HtmlView
扩展 AbstractViewJoomla 框架 HTML 视图类
| 自 |
2.0.0 |
|---|---|
| 包 |
Joomla 框架 |
方法
__construct
实例化视图的方法。
__construct(\Joomla\Renderer\RendererInterface renderer) :
__toString
将渲染方法作为代理的魔法 toString 方法。
__toString() :
| 自 |
2.0.0 |
|---|
响应
字符串
addData
将对象添加到数据数组中
addData( key, value) :
继承
| 自 |
2.0.0 |
|---|
参数
- 键
string数组键- 值
mixed要添加的数据值
响应
$this
clearData
重置内部数据数组
clearData() :
继承
| 自 |
2.0.0 |
|---|
响应
$this
getData
检索数据数组
getData() : mixed||string|int
继承
| 自 |
2.0.0 |
|---|
响应
array<string|int, mixed>
getLayout
获取视图布局的方法。
getLayout() :
| 自 |
2.0.0 |
|---|
响应
string 布局名称。
removeData
从数据数组中移除对象
removeData( key) :
继承
| 自 |
2.0.0 |
|---|
参数
- 键
string要移除的数组键
响应
$this
render
渲染视图的方法。
render() :
| 自 |
2.0.0 |
|---|
响应
string 渲染后的视图。
setData
将附加数据设置为数据数组
setData(mixed||string|int data) :
继承
| 自 |
2.0.0 |
|---|
参数
- 数据
array<string|int, mixed>要合并到现有数据数组中的数据
响应
$this
setLayout
设置视图布局的方法。
setLayout( layout) :
| 自 |
2.0.0 |
|---|
参数
- 布局
string布局名称。
响应
$this
setRenderer
设置渲染器对象
setRenderer(\Joomla\Renderer\RendererInterface renderer) :
属性
数据
要传递给渲染器的数据数组
继承
| 自 |
2.0.0 |
|---|
类型
array<string|int, mixed>
布局
视图布局。
| 自 |
2.0.0 |
|---|
类型
字符串