/** * Helper function to quick add a button * * @param string $key * @param string $text The text to show in the button * @param string $iconUrl The URL of and image to show as button's icon * @return PhpExt_Toolbar_Button */ public function addButton($key, $text, $iconUrl = null, $handler = null) { include_once 'PhpExt/Toolbar/Button.php'; $this->_items->add(PhpExt_Toolbar_Button::createButton($text, $iconUrl, $handler), $key); return $this->_items->getByName($key); }