You are here

protected static function WatchdogPruneSettings::pruneAgeOptions in Watchdog Prune 8

Same name and namespace in other branches
  1. 8.2 src/Form/WatchdogPruneSettings.php \Drupal\watchdog_prune\Form\WatchdogPruneSettings::pruneAgeOptions()

Implements pruneAgeOptions().

Gets the Prune age options.

Return value

array An array of Prune age options.

1 call to WatchdogPruneSettings::pruneAgeOptions()
WatchdogPruneSettings::buildForm in src/Form/WatchdogPruneSettings.php
Form constructor.

File

src/Form/WatchdogPruneSettings.php, line 151

Class

WatchdogPruneSettings
Class WatchdogPruneSettings.

Namespace

Drupal\watchdog_prune\Form

Code

protected static function pruneAgeOptions() {
  $prune_age_options = [
    '' => t('None - do not prune based on age'),
    '-1 WEEK' => t('1 week'),
    '-2 WEEKS' => t('2 weeks'),
    '-3 WEEKS' => t('3 weeks'),
    '-1 MONTH' => t('1 month'),
    '-2 MONTHS' => t('2 months'),
    '-3 MONTHS' => t('3 months'),
    '-6 MONTHS' => t('6 months'),
    '-9 MONTHS' => t('9 months'),
    '-12 MONTHS' => t('12 months (1 year)'),
    '-18 MONTHS' => t('18 months (1.5 years)'),
    '-24 MONTHS' => t('24 months (2 years)'),
    '-30 MONTHS' => t('30 months (2.5 years)'),
    '-36 MONTHS' => t('36 months (3 years)'),
  ];
  return $prune_age_options;
}