function _backup_migrate_frequency_periods in Backup and Migrate 5.2
Get a list of available backup periods. Only returns time periods which have a (reasonably) consistent number of seconds.
3 calls to _backup_migrate_frequency_periods()
- backup_migrate_schedule_save_schedule in includes/
schedules.inc - Update an existing schedule or create a new one.
- backup_migrate_ui_schedule_configure_form in includes/
schedules.inc - Get a form to configure the schedule.
- _backup_migrate_schedule_get_frequency_period in includes/
schedules.inc - Get the period of the frequency (ie: seconds, minutes etc.)
File
- includes/
schedules.inc, line 412 - All of the schedule handling code needed for Backup and Migrate.
Code
function _backup_migrate_frequency_periods() {
return array(
'seconds' => array(
'type' => 'seconds',
'seconds' => 1,
'title' => t('Seconds'),
'singular' => t('Once a second'),
'plural' => t('Every @count seconds'),
),
'minutes' => array(
'type' => 'minutes',
'seconds' => 60,
'title' => t('Minutes'),
'singular' => t('Once a minute'),
'plural' => t('Every @count minutes'),
),
'hours' => array(
'type' => 'hours',
'seconds' => 3600,
'title' => t('Hours'),
'singular' => t('Once an hour'),
'plural' => t('Every @count hours'),
),
'days' => array(
'type' => 'days',
'seconds' => 86400,
'title' => t('Days'),
'singular' => t('Once a day'),
'plural' => t('Every @count days'),
),
'weeks' => array(
'type' => 'weeks',
'seconds' => 604800,
'title' => t('Weeks'),
'singular' => t('Once a week'),
'plural' => t('Every @count weeks'),
),
);
}