Back to HelpButton class

Method _getCommand

protected string
_getCommand
()
Get the JavaScript command for the button
Returns
  • string JavaScript command string
Since
  • 3.0
Class: HelpButton
Project: Joomla

Method _getCommand - Source code

/**
 * Get the JavaScript command for the button
 *
 * @return  string  JavaScript command string
 *
 * @since   3.0
 */
protected function _getCommand()
{
    // Get Help URL
    $url = Help::createUrl($this->getRef(), $this->getUseComponent(), $this->getUrl(), $this->getComponent());
    $url = json_encode(htmlspecialchars($url, ENT_QUOTES), JSON_HEX_APOS);
    $url = substr($url, 1, -1);
    $cmd = "Joomla.popupWindow('{$url}', '" . Text::_('JHELP', true) . "', 700, 500, 1)";
    return $cmd;
}