Example #1
0
 public function process($data)
 {
     if ($this->isValid($data) !== true) {
         throw new C3op_Form_LinkageCreateException('Invalid data!');
     } else {
         $db = Zend_Registry::get('db');
         $linkageMapper = new C3op_Register_LinkageMapper($db);
         $linkage = new C3op_Register_Linkage();
         $linkage->SetDepartment($this->department->GetValue());
         $linkage->SetPosition($this->position->GetValue());
         // $linkage->SetState($this->state->GetValue());
         $linkage->SetContact($this->contact->GetValue());
         $institution = $this->institution->GetValue();
         $linkage->SetInstitution($institution);
         $linkageMapper->insert($linkage);
     }
 }