rendered paste body<?phpclass QAccessPanel extends TActivePanel { private $_panel; private $_button; public function createChildControls() { $this->_panel=new TActivePanel; $this->_panel->setID('ap_admin'); $this->getControls()->add($this->_panel); $this->_button=new TActiveButton; $this->_button->setID('ap_button'); $this->_button->setCssClass('adminButton'); $this->_button->setText('Vis adminpanel'); $this->_button->onClick[] = array($this, 'toggleAdmin'); $this->getControls()->add($this->_button); } public function getAP() { $this->ensureChildControls(); return $this->_panel; } public function getButton() { $this->ensureChildControls(); return $this->_button; } public function toggleAdmin($sender, $param) { $this->_panel->setVisible(!$this->_panel->getVisible()); $this->render(); }}?>