/** * Store the form's values for this project. * @param PROJECT $obj * @access private */ protected function _store_to_object($obj) { parent::_store_to_object($obj); if ($obj->exists()) { $obj->trunk_id = $this->value_for('trunk_id'); } $options = $obj->options(); $options->set_inherited(!$this->value_for('defines_options'), false); $this->_store_to_options($options); if ($this->previewing()) { if (!$obj->exists()) { $trunk = $obj->new_object('branch'); $trunk->title = $this->value_for('branch_title'); $obj->_trunk = $trunk; } } }
/** * Store the form's values to this album. * @param ALBUM $obj * @access private */ protected function _store_to_object($obj) { $obj->url_root = $this->value_as_text('url_root'); $obj->location = $this->value_as_text('location'); /** @var DATE_TIME $first_day_value */ $first_day_value = $this->value_for('first_day'); /** @var DATE_TIME $last_day_value */ $last_day_value = $this->value_for('last_day'); $obj->show_times = $this->value_for('show_times'); $obj->show_celsius = $this->value_for('show_celsius'); $obj->set_date_style($this->value_for('date_style'), $first_day_value, $last_day_value); $obj->main_picture_id = $this->value_for('main_picture_id'); if ($this->value_for('constrain_picture_size')) { $obj->max_picture_width = $this->value_for('max_picture_width'); $obj->max_picture_height = $this->value_for('max_picture_height'); } else { $obj->max_picture_width = 0; $obj->max_picture_height = 0; } parent::_store_to_object($obj); }