HelpButton
扩展自 BasicButton渲染帮助弹出窗口按钮
| 自 |
3.0 |
|---|---|
| 包 |
Joomla CMS |
方法
__call
Magiix 方法以适应选项访问器。
__call( name, mixed||string|int args) :
| 抛出 |
|
|---|---|
| 自 |
4.0.0 |
参数
- name
string方法名称。- args
array<string|int, mixed>方法参数。
响应
mixed
__construct
初始化此类。
__construct( name = '', text = '', mixed||string|int options = []) :
| 自 |
4.0.0 |
|---|---|
| 抛出 |
|
参数
- name
string此按钮的名称。- text
string按钮文本,将自动翻译。- options
array<string|int, mixed>按钮选项。
响应
mixed
_getCommand
获取按钮的 JavaScript 命令
_getCommand() :
| 自 |
3.0 |
|---|
响应
stringJavaScript 命令字符串
attributes
attributes(mixed||string|int value) :
参数
- value
array<string|int, mixed>
响应
self
buttonClass
buttonClass( value) :
参数
- value
string
响应
self
component
component( value) :
参数
- value
string
响应
self
ensureUniqueId
确保 ID 唯一
ensureUniqueId( id) :
| 自 |
4.0.0 |
|---|
参数
- id
stringID 字符串。
响应
string
fetchButton
获取按钮 HTML 代码。
fetchButton( type = 'Help', ref = '', com = false, override = null, component = null) :
| 自 |
3.0 |
|---|---|
| 已弃用 |
4.3 将在 6.0 中移除 使用 render() 代替。 |
参数
- type
string未使用的字符串。- ref
string帮助屏幕的名称(其键引用)。- com
bool使用组件目录中的帮助文件。- override
string使用此 URL 而不是任何其他 URL。- component
string获取帮助的组件名称(当前组件为 null)
响应
string
fetchIconClass
获取图标标识符的 CSS 类名称的方法
fetchIconClass( identifier) :
可以在最终类中重新定义
| 自 |
3.0 |
|---|
参数
- identifier
string图标识别字符串
响应
stringCSS 类名称
fetchId
获取按钮 CSS ID。
fetchId() :
| 自 |
3.0 |
|---|
响应
string按钮 CSS ID
findOptionName
从访问器查找字段选项名称。
findOptionName( name) : bool|string
| 自 |
4.0.0 |
|---|
参数
- name
string字段名称。
响应
bool|string
form
form( value) :
参数
- value
string
响应
self
formValidation
formValidation( value) :
参数
- value
bool
响应
self
getAccessors
配置可用选项访问器的方法。
getAccessors() : mixed||string|int
| 自 |
4.0.0 |
|---|
响应
array<string|int, mixed>
getAttributes
getAttributes() : mixed||string|int
响应
array<string|int, mixed>
getButtonClass
getButtonClass() :
响应
string
getComponent
getComponent() :
响应
string
getForm
getForm() :
响应
string
getFormValidation
getFormValidation() :
响应
bool
getIcon
getIcon() :
响应
string
getLayout
获取布局路径。
getLayout() :
| 自 |
4.0.0 |
|---|
响应
string
getListCheck
getListCheck() :
响应
bool
getListCheckMessage
getListCheckMessage() :
响应
string
getName
获取按钮名称。
getName() :
| 自 |
4.0.0 |
|---|
响应
string
getOnclick
getOnclick() :
响应
string
getOption
获取单个选项值。
getOption( name, default = null) :
| 自 |
4.0.0 |
|---|
参数
- name
string选项名称。- default
mixed如果此名称不存在,则为默认值。
响应
mixed
getOptions
获取按钮选项。
getOptions() : mixed||string|int
| 自 |
4.0.0 |
|---|
响应
array<string|int, mixed>
getRef
getRef() :
响应
string
getTask
getTask() :
响应
string
getText
getText() :
响应
string
getUrl
getUrl() :
响应
string
getUseComponent
getUseComponent() :
响应
bool
icon
icon( value) :
参数
- value
string
响应
self
layout
设置布局路径。
layout( layout) :
| 自 |
4.0.0 |
|---|
参数
- layout
string要渲染的布局路径名称。
响应
static返回 self 以支持链式调用。
listCheck
listCheck( value) :
参数
- value
bool
响应
self
listCheckMessage
listCheckMessage( value) :
参数
- value
string
响应
self
name
设置按钮名称。
name( name) :
| 自 |
4.0.0 |
|---|
参数
- name
string按钮名称。
响应
static返回 self 以支持链式调用。
onclick
onclick( value) :
参数
- value
string
响应
self
prepareOptions
准备此按钮的选项。
prepareOptions(mixed||string|int &options) :
| 自 |
4.0.0 |
|---|
参数
- options
array<string|int, mixed>关于此按钮的选项。
响应
void
ref
ref( value) :
参数
- value
string
响应
self
render
获取渲染按钮的 HTML
render(mixed||string|int &definition = null) :
| 自 |
3.0 |
|---|---|
| 抛出 |
|
参数
- definition
array<string|int, mixed>要传递的参数
响应
string
renderButton
渲染按钮 HTML。
renderButton(mixed||string|int &options) :
| 自 |
4.0.0 |
|---|
参数
- options
array<string|int, mixed>按钮选项。
响应
string按钮 HTML。
setOption
设置选项值。
setOption( name, value) :
| 自 |
4.0.0 |
|---|
参数
- name
string要存储值的选项名称。- value
mixed选项值。
响应
静态
setOptions
设置所有选项。
setOptions(mixed||string|int options) :
| 自 |
4.0.0 |
|---|
参数
- options
array<string|int, mixed>按钮选项。
响应
static返回 self 以支持链式调用。
setParent
设置父工具栏实例。
setParent(\Joomla\CMS\Toolbar\Toolbar parent) :
task
task( value) :
参数
- value
string
响应
self
text
text( value) :
参数
- value
string
响应
self
url
url( value) :
参数
- value
string
响应
self
useComponent
useComponent( value) :
参数
- value
bool
响应
self
属性
name
此按钮的名称。
| 自 |
4.0.0 |
|---|
类型
string
layout
属性布局。
| 自 |
4.0.0 |
|---|
类型
string
options
按钮选项。
| 自 |
4.0.0 |
|---|
类型
array<string|int, mixed>
idCounter
用于跟踪 ID,以避免重复
| 自 |
4.0.0 |
|---|
类型
array<string|int, mixed>