fetchIconClass($name); $options['onClose'] = ''; $doTask = $this->_getCommand($url); $options['doTask'] = 'Joomla.setcollapse(\'' . $doTask . '\', \'' . $name . '\', \'' . $height . '\');'; if ($onClose) { $options['onClose'] = ' rel="{onClose: function() {' . $onClose . '}}"'; } // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('joomla.toolbar.slider'); return $layout->render($options); } /** * Get the button id * * @param string $type Button type * @param string $name Button name * * @return string Button CSS Id * * @since 3.0 */ public function fetchId($type, $name) { return $this->_parent->getName() . '-slider-' . $name; } /** * Get the JavaScript command for the button * * @param string $url URL for popup * * @return string JavaScript command string * * @since 3.0 */ private function _getCommand($url) { if (substr($url, 0, 4) !== 'http') { $url = JUri::base() . $url; } return $url; } }