private function save() { $this->config->set_items_per_page($this->form->get_value('items_per_page')); $forbidden_tags = array(); foreach ($this->form->get_value('forbidden_tags') as $field => $option) { $forbidden_tags[] = $option->get_raw_value(); } $this->config->set_forbidden_tags($forbidden_tags); if ($this->form->get_value('max_links_number_per_message_enabled')) { $this->config->enable_max_links_number_per_message(); $this->config->set_maximum_links_message($this->form->get_value('max_links_number_per_message')); } else { $this->config->disable_max_links_number_per_message(); } $this->config->set_authorizations($this->form->get_value('authorizations')->build_auth_array()); GuestbookConfig::save(); GuestbookMessagesCache::invalidate(); }