/** * Returns a new object which maps this change to the given branch. * @param BRANCH $branch * @return CHANGE_BRANCH_INFO */ public function new_branch_info($branch) { $Result = parent::new_branch_info($branch); $Result->time_applied->set_now(); $Result->applier_id = $this->app->login->id; return $Result; }
/** * Store the form's values for this job. * @param PROJECT_ENTRY $obj * @access private */ protected function _store_to_object($obj) { $main_branch_id = $this->value_for('main_branch_id'); $obj->kind = $this->value_for('kind'); $obj->component_id = $this->value_for('component_id'); $obj->extra_description = $this->value_for('extra_description'); foreach ($this->branches as $branch) { if ($this->value_for("branch_{$branch->id}_enabled")) { $branch_info = $obj->new_branch_info($branch); $this->_store_to_branch_info($branch_info); $obj->add_branch_info($branch_info); if ($main_branch_id == $branch->id) { $obj->set_main_branch_info($branch_info); } } } parent::_store_to_object($obj); }