public static function KanbanFilterForm::getDateRangeOptions in Content Planner 8
Gets the Date Range options.
Return value
array Returns an array with the date range options.
2 calls to KanbanFilterForm::getDateRangeOptions()
- KanbanFilterForm::buildForm in modules/
content_kanban/ src/ Form/ KanbanFilterForm.php - Form constructor.
- SettingsForm::buildForm in modules/
content_kanban/ src/ Form/ SettingsForm.php - Form constructor.
File
- modules/
content_kanban/ src/ Form/ KanbanFilterForm.php, line 225
Class
- KanbanFilterForm
- KanbanFilterForm class.
Namespace
Drupal\content_kanban\FormCode
public static function getDateRangeOptions() {
//static for now, maybe it needs to be more dynamic later
$options = [];
//@todo t() is bad - how can we get the translation service (without using global context)
$options['1'] = t('1 Day');
$options['7'] = t('7 Days');
$options['30'] = t('30 Days');
$options['90'] = t('90 Days');
$options['365'] = t('Year');
return $options;
}