private function save() { $this->config->set_number_news_per_page($this->form->get_value('number_news_per_page')); $this->config->set_number_columns_display_news($this->form->get_value('number_columns_display_news')); $this->config->set_display_condensed_enabled($this->form->get_value('display_condensed')); if ($this->config->get_display_condensed_enabled()) { if ($this->form->get_value('display_descriptions_to_guests')) { $this->config->display_descriptions_to_guests(); } else { $this->config->hide_descriptions_to_guests(); } } $this->config->set_number_character_to_cut($this->form->get_value('number_character_to_cut', $this->config->get_number_character_to_cut())); $this->config->set_comments_enabled($this->form->get_value('comments_enabled')); $this->config->set_news_suggestions_enabled($this->form->get_value('news_suggestions_enabled')); $this->config->set_author_displayed($this->form->get_value('author_displayed')); $this->config->set_display_type($this->form->get_value('display_type')->get_raw_value()); $this->config->set_authorizations($this->form->get_value('authorizations')->build_auth_array()); NewsConfig::save(); NewsService::get_categories_manager()->regenerate_cache(); }