protected function populate(int $id, &$requirement_value)
 {
     if ($requirement_value == null) {
         $requirement_value = new logistic_requirement_value((int) $id);
         $requirement_value->set_requirement_id($this->unmarshal($this->db->f('requirement_id'), 'int'));
         $requirement_value->set_value($this->unmarshal($this->db->f('value'), 'string'));
         $requirement_value->set_operator($this->unmarshal($this->db->f('operator'), 'string'));
         $requirement_value->set_cust_attribute_id($this->unmarshal($this->db->f('cust_attribute_id'), 'int'));
     }
     return $requirement_value;
 }
 public function save_requirement_values()
 {
     $requirement_id = phpgw::get_var('requirement_id');
     $attributes_array = array();
     $attributes_array = phpgw::get_var('cust_attributes');
     $this->so_requirement_value->delete_values($requirement_id);
     foreach ($attributes_array as $attribute) {
         $attribute_array = explode(":", $attribute);
         $cust_attribute_id = $attribute_array[0];
         $operator = $attribute_array[1];
         $attrib_value = $attribute_array[2];
         $requirement_value = new logistic_requirement_value();
         $requirement_value->set_requirement_id($requirement_id);
         $requirement_value->set_value($attrib_value);
         $requirement_value->set_operator($operator);
         $requirement_value->set_cust_attribute_id($cust_attribute_id);
         $user_id = $GLOBALS['phpgw_info']['user']['id'];
         $requirement_value->set_create_user($user_id);
         $this->so_requirement_value->store($requirement_value);
     }
     $GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 'logistic.uirequirement.view_requirement_values', 'requirement_id' => $requirement_id, 'nonavbar' => $this->nonavbar));
 }