本文整理汇总了PHP中Button::setExtra方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::setExtra方法的具体用法?PHP Button::setExtra怎么用?PHP Button::setExtra使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::setExtra方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getField
/**
* TextField::getField()
*
* Return the HTML of the field
*
* @return string: the html
* @access public
* @author Johan Wiegel
*/
function getField()
{
// view mode enabled ?
if ($this->getViewMode()) {
// get the view value..
return $this->_getViewValue();
}
//$this->_form->_setJS( '<script>function SetUrl( sUrl ){document.getElementById(\'bestand\').value=sUrl}</script>', $isFile = false, $before = true);
$oButton = new Button($this->_form, 'Bladeren');
$oButton->setCaption('Bladeren');
$oButton->setExtra("onclick=\"window.open( '" . FH_FHTML_DIR . "filemanager/browser/default/browser.html?Type=File&naam=" . $this->_sName . "&Connector=../../connectors/php/connector.php?ServerPath=" . $this->_path . "','','modal=yes,width=650,height=400');\"");
$sButton = $oButton->getButton();
return sprintf('<input type="text" name="%s" id="%1$s" value="%s" size="%d" %s' . FH_XHTML_CLOSE . '>%s %s ', $this->_sName, isset($this->_mValue) ? htmlspecialchars($this->_mValue) : '', $this->_iSize, (isset($this->_iTabIndex) ? 'tabindex="' . $this->_iTabIndex . '" ' : '') . (isset($this->_sExtra) ? ' ' . $this->_sExtra . ' ' : ''), isset($this->_sExtraAfter) ? $this->_sExtraAfter : '', $sButton);
}
示例2: backButton
/**
* FormHandler::backButton()
*
* Generate a back button to go one page back in a multi-paged form
*
* @param string $caption: The caption of the button
* @param string $name: The name of the button
* @param string $extra: CSS, Javascript or other which are inserted into the HTML tag
* @return void
* @access public
* @author Teye Heimans
*/
function backButton($caption = null, $name = null, $extra = null)
{
static $setJS = false;
// include the needed javascript file
if (!$setJS) {
$this->_setJS(FH_FHTML_DIR . 'js/page_back.js', true);
$setJS = true;
}
// get new button name if none given
if (empty($name)) {
$name = $this->_getNewButtonName();
}
$extra .= ' onclick="pageBack(document.forms[\'' . $this->_name . '\']);"';
// if no caption is given, get our own caption
if (is_null($caption)) {
$caption = $this->_text(38);
}
// create new button
$btn = new Button($this, $name);
$btn->setCaption($caption);
if (!empty($extra)) {
$btn->setExtra($extra);
}
// register the button
$this->_registerField($name, $btn);
}