private function save() { $this->config->set_title($this->form->get_value('title')); if ($this->form->get_value('informations_enabled')) { $this->config->enable_informations(); $this->config->set_informations($this->form->get_value('informations')); $this->config->set_informations_position($this->form->get_value('informations_position')->get_raw_value()); } else { $this->config->disable_informations(); } if ($this->form->get_value('tracking_number_enabled')) { $this->config->enable_tracking_number(); if ($this->form->get_value('date_in_tracking_number_enabled')) { $this->config->enable_date_in_tracking_number(); } else { $this->config->disable_date_in_tracking_number(); } } else { $this->config->disable_tracking_number(); } if ($this->form->get_value('sender_acknowledgment_enabled')) { $this->config->enable_sender_acknowledgment(); } else { $this->config->disable_sender_acknowledgment(); } $this->config->set_authorizations($this->form->get_value('authorizations')->build_auth_array()); ContactConfig::save(); }