/** * Render the form for removing a dashboard elemetn * * @return string The html representation of the form */ protected function getRemoveForm() { // TODO: temporarily disabled, should point to a form asking for confirmal return ''; $removeUrl = Url::fromPath('/dashboard/removecomponent', array('pane' => $this->pane->getName(), 'component' => $this->getTitle())); $form = new Form(); $form->setMethod('POST'); $form->setAttrib('class', 'inline'); $form->setAction($removeUrl); $form->addElement(new Zend_Form_Element_Button('remove_pane_btn', array('class' => 'link-like pull-right', 'type' => 'submit', 'label' => 'x'))); return $form; }
/** * Add a pane object to this dashboard * * @param Pane $pane The pane to add * * @return $this */ public function addPane(Pane $pane) { $this->panes[$pane->getName()] = $pane; return $this; }