You are here

function backup_migrate_schedule::frequency_periods in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.2 includes/schedules.inc \backup_migrate_schedule::frequency_periods()
  2. 8.3 includes/schedules.inc \backup_migrate_schedule::frequency_periods()
  3. 6.2 includes/schedules.inc \backup_migrate_schedule::frequency_periods()
  4. 7.3 includes/schedules.inc \backup_migrate_schedule::frequency_periods()
  5. 7.2 includes/schedules.inc \backup_migrate_schedule::frequency_periods()

Get a list of available backup periods. Only returns time periods which have a (reasonably) consistent number of seconds (ie: no months).

3 calls to backup_migrate_schedule::frequency_periods()
backup_migrate_schedule::edit_form in includes/schedules.inc
Get the edit form.
backup_migrate_schedule::edit_form_submit in includes/schedules.inc
Submit the edit form.
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 599
All of the schedule handling code needed for Backup and Migrate.

Class

backup_migrate_schedule
A schedule class for crud operations.

Code

function 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'),
    ),
  );
}