コード例 #1
0
 private function save()
 {
     $this->config->set_items_number_per_page($this->form->get_value('items_number_per_page'));
     if ($this->form->get_value('comments_enabled')) {
         $this->config->enable_comments();
     } else {
         $this->config->disable_comments();
     }
     $this->config->set_event_color($this->form->get_value('event_color'));
     if ($this->form->get_value('members_birthday_enabled')) {
         $this->config->enable_members_birthday();
         $this->config->set_birthday_color($this->form->get_value('birthday_color'));
     } else {
         $this->config->disable_members_birthday();
     }
     $this->config->set_authorizations($this->form->get_value('authorizations')->build_auth_array());
     CalendarConfig::save();
     CalendarService::get_categories_manager()->regenerate_cache();
     CalendarCurrentMonthEventsCache::invalidate();
 }