private function handle_form() { $config = SitemapConfig::load(); if ($this->form->get_value('enable_sitemap_xml')) { $config->enable_sitemap_xml_generation(); $config->set_sitemap_xml_life_time((int) $this->form->get_value('file_life_time')); } else { $config->disable_sitemap_xml_generation(); } SitemapConfig::save($config); }
private static function update_last_generation_date() { $sitemap_config = SitemapConfig::load(); $sitemap_config->set_last_generation_date(new Date()); SitemapConfig::save($sitemap_config); }