private function _addElementExpertiseareas() { $this->addElement('MultiCheckbox', 'expertise_areas_id', array('required' => true, 'label' => 'Expertise areas', 'dimension' => 1)); $el = $this->getElement('expertise_areas_id'); $expd = new Staff_Domain_Expertisearea(); $exp = $expd->getAll('name'); foreach ($exp as $e) { $el->addMultiOption($e->getId(), $e->getName()); } $el->setSeparator('   '); $el->setAttrib('label_class', 'display-inline-block'); if ($this->_model) { $check = array(); foreach ($this->_model->getExpertisearea() as $key => $expItem) { $check[] = $expItem->id; } $el->setValue($check); } }
public function delete() { if ($this->_isAllowed()) { try { $u = new Staff_Persist_Dao_Volunteer(); return $u->delete($this->_volunteer->getId()); } catch (Exception $e) { throw $e; } } }