JButtonPopup/fetchButton: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 72: | Line 72: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=fetchButton | category=fetchButton | ||
category=JButtonPopup | category=JButtonPopup | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 00:20, 25 March 2017
<! removed transcluded page call, red link never existed >
Syntax
fetchButton($type='Popup', $name= '', $text= '', $url= '', $width=640, $height=480, $top=0, $left=0)
| Parameter Name | Default Value | Description |
|---|---|---|
| $type | 'Popup' | |
| $name | ||
| $text | ||
| $url | ||
| $width | 640 | |
| $height | 480 | |
| $top | 0 | |
| $left | 0 |
Defined in
libraries/joomla/html/toolbar/button/popup.php
Importing
jimport( 'joomla.html.toolbar.button.popup' );
Source Body
function fetchButton( $type='Popup', $name = '', $text = '', $url = '', $width=640, $height=480, $top=0, $left=0 )
{
JHTML::_('behavior.modal');
$text = JText::_($text);
$class = $this->fetchIconClass($name);
$doTask = $this->_getCommand($name, $url, $width, $height, $top, $left);
$html = "<a class=\"modal\" href=\"$doTask\" rel=\"{handler: 'iframe', size: {x: $width, y: $height}}\">\n";
$html .= "<span class=\"$class\" title=\"$text\">\n";
$html .= "</span>\n";
$html .= "$text\n";
$html .= "</a>\n";
return $html;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples