PopupButton
Extends ToolbarButtonRenders a modal window button
since |
3.0 |
---|---|
package |
Joomla CMS |
Methods
__call
Magiix method to adapt option accessors.
__call( name, mixed||string|int args) :
throws |
|
---|---|
since |
4.0.0 |
Arguments
- name
string
The method name.- args
array<string|int, mixed>
The method arguments.
Response
mixed
__construct
Init this class.
__construct( name = '', text = '', mixed||string|int options = []) :
since |
4.0.0 |
---|---|
throws |
|
Arguments
- name
string
Name of this button.- text
string
The button text, will auto translate.- options
array<string|int, mixed>
Button options.
Response
mixed
_getCommand
Get the JavaScript command for the button
_getCommand( url) :
since |
3.0 |
---|
Arguments
- url
string
URL for popup
Response
string
JavaScript command string
attributes
attributes(mixed||string|int value) :
Arguments
- value
array<string|int, mixed>
Response
self
bodyHeight
bodyHeight( value) :
Arguments
- value
int
Response
self
buttonClass
buttonClass( value) :
Arguments
- value
string
Response
self
ensureUniqueId
Make sure the id is unique
ensureUniqueId( id) :
since |
4.0.0 |
---|
Arguments
- id
string
The id string.
Response
string
fetchButton
Fetch the HTML for the button
fetchButton( type = 'Modal', name = '', text = '', url = '', iframeWidth = 640, iframeHeight = 480, bodyHeight = null, modalWidth = null, onClose = '', title = '', footer = null) :
since |
3.0 |
---|
Arguments
- type
string
Unused string, formerly button type.- name
string
Modal name, used to generate element ID- text
string
The link text- url
string
URL for popup- iframeWidth
int
Width of popup- iframeHeight
int
Height of popup- bodyHeight
int
Optional height of the modal body in viewport units (vh)- modalWidth
int
Optional width of the modal in viewport units (vh)- onClose
string
JavaScript for the onClose event.- title
string
The title text- footer
string
The footer html
Response
string
HTML string for the button
fetchIconClass
Method to get the CSS class name for an icon identifier
fetchIconClass( identifier) :
Can be redefined in the final class
since |
3.0 |
---|
Arguments
- identifier
string
Icon identification string
Response
string
CSS class name
fetchId
Get the button CSS Id.
fetchId() :
since |
3.0 |
---|
Response
string
Button CSS Id
findOptionName
Find field option name from accessors.
findOptionName( name) : bool|string
since |
4.0.0 |
---|
Arguments
- name
string
The field name.
Response
bool|string
form
form( value) :
Arguments
- value
string
Response
self
formValidation
formValidation( value) :
Arguments
- value
bool
Response
self
getAccessors
Method to configure available option accessors.
getAccessors() : mixed||string|int
since |
4.0.0 |
---|
Response
array<string|int, mixed>
getAttributes
getAttributes() : mixed||string|int
Response
array<string|int, mixed>
getBodyHeight
getBodyHeight() :
Response
int
getButtonClass
getButtonClass() :
Response
string
getForm
getForm() :
Response
string
getFormValidation
getFormValidation() :
Response
bool
getIcon
getIcon() :
Response
string
getIframeHeight
getIframeHeight() :
Response
int
getIframeWidth
getIframeWidth() :
Response
int
getLayout
Get layout path.
getLayout() :
since |
4.0.0 |
---|
Response
string
getListCheck
getListCheck() :
Response
bool
getListCheck
getListCheck() :
Response
bool
getListCheckMessage
getListCheckMessage() :
Response
string
getModalWidth
getModalWidth() :
Response
int
getName
Get button name.
getName() :
since |
4.0.0 |
---|
Response
string
getOnclick
getOnclick() :
Response
string
getOnclose
getOnclose() :
Response
string
getOption
Get single option value.
getOption( name, default = null) :
since |
4.0.0 |
---|
Arguments
- name
string
The option name.- default
mixed
The default value if this name not exists.
Response
mixed
getOptions
Get button options.
getOptions() : mixed||string|int
since |
4.0.0 |
---|
Response
array<string|int, mixed>
getParent
Get parent toolbar instance.
getParent() : \Joomla\CMS\Toolbar\Toolbar
getSelector
getSelector() :
Response
string
getTask
getTask() :
Response
string
getText
getText() :
Response
string
getTitle
getTitle() :
Response
string
getUrl
getUrl() :
Response
string
icon
icon( value) :
Arguments
- value
string
Response
self
icon
icon( value) :
Arguments
- value
string
Response
self
iframeHeight
iframeHeight( value) :
Arguments
- value
int
Response
self
iframeWidth
iframeWidth( value) :
Arguments
- value
int
Response
self
layout
Set layout path.
layout( layout) :
since |
4.0.0 |
---|
Arguments
- layout
string
The layout path name to render.
Response
static
Return self to support chaining.
listCheck
listCheck( value) :
Arguments
- value
bool
Response
self
listCheck
listCheck( value) :
Arguments
- value
bool
Response
self
listCheckMessage
listCheckMessage( value) :
Arguments
- value
string
Response
self
modalWidth
modalWidth( value) :
Arguments
- value
int
Response
self
name
Set button name.
name( name) :
since |
4.0.0 |
---|
Arguments
- name
string
The button name.
Response
static
Return self to support chaining.
onclick
onclick( value) :
Arguments
- value
string
Response
self
onclose
onclose( value) :
Arguments
- value
string
Response
self
prepareOptions
Prepare options for this button.
prepareOptions(mixed||string|int &options) :
since |
4.0.0 |
---|
Arguments
- options
array<string|int, mixed>
The options about this button.
Response
void
render
Get the HTML to render the button
render(mixed||string|int &definition = null) :
since |
3.0 |
---|---|
throws |
|
Arguments
- definition
array<string|int, mixed>
Parameters to be passed
Response
string
renderButton
Render button HTML.
renderButton(mixed||string|int &options) :
since |
4.0.0 |
---|
Arguments
- options
array<string|int, mixed>
The button options.
Response
string
The button HTML.
selector
selector( value) :
Arguments
- value
string
Response
self
setOption
Set option value.
setOption( name, value) :
since |
4.0.0 |
---|
Arguments
- name
string
The option name to store value.- value
mixed
The option value.
Response
static
setOptions
Set all options.
setOptions(mixed||string|int options) :
since |
4.0.0 |
---|
Arguments
- options
array<string|int, mixed>
The button options.
Response
static
Return self to support chaining.
setParent
Set parent Toolbar instance.
setParent(\Joomla\CMS\Toolbar\Toolbar parent) :
since |
4.0.0 |
---|
Arguments
- parent
Toolbar
The parent Toolbar instance to set.
Response
static
Return self to support chaining.
task
task( value) :
Arguments
- value
string
Response
self
text
text( value) :
Arguments
- value
string
Response
self
title
title( value) :
Arguments
- value
string
Response
self
url
url( value) :
Arguments
- value
string
Response
self
Properties
name
Name of this button.
since |
4.0.0 |
---|
Type(s)
string
layout
Property layout.
since |
4.0.0 |
---|
Type(s)
string
options
Button options.
since |
4.0.0 |
---|
Type(s)
array<string|int, mixed>
idCounter
Used to track an ids, to avoid duplication
since |
4.0.0 |
---|
Type(s)
array<string|int, mixed>