Piwik\Plugins\PrivacyManager\Controller::getPurgeSettingsFromRequest PHP Метод

getPurgeSettingsFromRequest() приватный Метод

Utility function. Gets the delete logs/reports settings from the request and uses them to populate config arrays.
private getPurgeSettingsFromRequest ( ) : array
Результат array An array containing the data deletion settings.
    private function getPurgeSettingsFromRequest()
    {
        $settings = array();
        // delete logs settings
        $settings['delete_logs_enable'] = Common::getRequestVar("enableDeleteLogs", 0);
        $settings['delete_logs_schedule_lowest_interval'] = Common::getRequestVar("deleteLowestInterval", 7);
        $settings['delete_logs_older_than'] = (int) Common::getRequestVar("deleteLogsOlderThan", 180) < 1 ? 1 : Common::getRequestVar("deleteOlderThan", 180);
        // delete reports settings
        $settings['delete_reports_enable'] = Common::getRequestVar("enableDeleteReports", 0);
        $deleteReportsOlderThan = Common::getRequestVar("deleteReportsOlderThan", 3);
        $settings['delete_reports_older_than'] = $deleteReportsOlderThan < 3 ? 3 : $deleteReportsOlderThan;
        $settings['delete_reports_keep_basic_metrics'] = Common::getRequestVar("keepBasic", 0);
        $settings['delete_reports_keep_day_reports'] = Common::getRequestVar("keepDay", 0);
        $settings['delete_reports_keep_week_reports'] = Common::getRequestVar("keepWeek", 0);
        $settings['delete_reports_keep_month_reports'] = Common::getRequestVar("keepMonth", 0);
        $settings['delete_reports_keep_year_reports'] = Common::getRequestVar("keepYear", 0);
        $settings['delete_reports_keep_range_reports'] = Common::getRequestVar("keepRange", 0);
        $settings['delete_reports_keep_segment_reports'] = Common::getRequestVar("keepSegments", 0);
        $settings['delete_logs_max_rows_per_query'] = PiwikConfig::getInstance()->Deletelogs['delete_logs_max_rows_per_query'];
        return $settings;
    }