示例#1
0
 public function getExpertiseAreas($id)
 {
     $db = $this->getDefaultAdapter();
     $sql = $db->select();
     $sql->from('volunteer_expertise_area');
     $sql->where('volunteer_id = ?', $id);
     $db->setFetchMode(Zend_DB::FETCH_ASSOC);
     $res = $db->fetchAll($sql);
     $areas = array();
     $expdomain = new Staff_Domain_Expertisearea();
     foreach ($res as $exp) {
         $areas[] = $expdomain->getById($exp['expertise_area_id']);
     }
     return $areas;
 }
示例#2
0
 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('&nbsp&nbsp&nbsp');
     $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);
     }
 }
示例#3
0
 public function __construct()
 {
     $boot = Agana_Util_Bootstrap::getBootstrap('staff');
     $boot = $boot->getOptions();
     $this->_name = 'Staff';
     $this->_navigation[] = array('icon' => 'icon-group', 'label' => 'Employees', 'module' => 'staff', 'controller' => 'employee', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     if (Staff_Domain_Volunteer::isControllerEnabled()) {
         $this->_navigation[] = array('icon' => 'icon-group', 'label' => 'Volunteers', 'module' => 'staff', 'controller' => 'volunteer', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     }
     $this->_navigation[] = array('icon' => 'icon-wrench', 'label' => 'Job function', 'module' => 'staff', 'controller' => 'jobfunction', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     if (Staff_Domain_Expertisearea::isControllerEnabled()) {
         $this->_navigation[] = array('icon' => 'icon-certificate', 'label' => 'Expertise area', 'module' => 'staff', 'controller' => 'expertisearea', 'action' => 'list', 'route' => 'default', 'uri' => '', 'title' => '');
     }
 }