You are here

class backup_migrate_filter in Backup and Migrate 8.2

Same name and namespace in other branches
  1. 8.3 includes/filters.inc \backup_migrate_filter
  2. 6.3 includes/filters.inc \backup_migrate_filter
  3. 6.2 includes/filters.inc \backup_migrate_filter
  4. 7.3 includes/filters.inc \backup_migrate_filter
  5. 7.2 includes/filters.inc \backup_migrate_filter

A base class for basing filters on.

Hierarchy

Expanded class hierarchy of backup_migrate_filter

File

includes/filters.inc, line 179
All of the filter handling code needed for Backup and Migrate.

View source
class backup_migrate_filter {
  var $weight = 0;
  var $op_weights = array();

  /**
   * Get the weight of the filter for the given op.
   */
  function weight($op = NULL) {
    if ($op && isset($this->op_weights[$op])) {
      return $this->op_weights[$op];
    }
    return $this->weight;
  }

  /**
   * Get the form for the settings for this filter.
   */
  function backup_settings_default() {
    return array();
  }

  /**
   * Get the form for the settings for this filter.
   */
  function backup_settings_form($settings) {
    return array();
  }

  /**
   * Get the form for the settings for this filter.
   */
  function backup_settings_form_validate($form, &$form_state) {
  }

  /**
   * Submit the settings form. Any values returned will be saved.
   */
  function backup_settings_form_submit($form, &$form_state) {
    return $form_state['values'];
  }

  /**
   * Get the form for the settings for this filter.
   */
  function restore_settings_default() {
    return array();
  }

  /**
   * Get the form for the settings for this filter.
   */
  function restore_settings_form($settings) {
    return array();
  }

  /**
   * Get the form for the settings for this filter.
   */
  function restore_settings_form_validate($form, &$form_state) {
  }

  /**
   * Submit the settings form. Any values returned will be saved.
   */
  function restore_settings_form_submit($form, &$form_state) {
    return $form_state['values'];
  }

  /**
   * Get a list of file types handled by this filter.
   */
  function file_types() {
    return array();
  }

  /**
   * Declare any default destinations for this filter.
   */
  function destinations() {
    return array();
  }

  /**
   * This function is called on a backup file after the backup has been completed.
   */
  function backup($file, &$settings) {
    return $file;
  }

  /**
   * This function is called on a backup file before importing it.
   */
  function restore($file, &$settings) {
    return $file;
  }

  /**
   * This function is called immediately prior to backup.
   */
  function pre_backup($source, $file, $settings) {
  }

  /**
   * This function is called immediately post backup.
   */
  function post_backup($source, $file, $settings) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
backup_migrate_filter::$op_weights property 3
backup_migrate_filter::$weight property
backup_migrate_filter::backup function This function is called on a backup file after the backup has been completed. 3
backup_migrate_filter::backup_settings_default function Get the form for the settings for this filter. 5
backup_migrate_filter::backup_settings_form function Get the form for the settings for this filter. 5
backup_migrate_filter::backup_settings_form_submit function Submit the settings form. Any values returned will be saved. 1
backup_migrate_filter::backup_settings_form_validate function Get the form for the settings for this filter. 1
backup_migrate_filter::destinations function Declare any default destinations for this filter. 1
backup_migrate_filter::file_types function Get a list of file types handled by this filter. 3
backup_migrate_filter::post_backup function This function is called immediately post backup. 1
backup_migrate_filter::pre_backup function This function is called immediately prior to backup. 1
backup_migrate_filter::restore function This function is called on a backup file before importing it. 3
backup_migrate_filter::restore_settings_default function Get the form for the settings for this filter. 2
backup_migrate_filter::restore_settings_form function Get the form for the settings for this filter. 2
backup_migrate_filter::restore_settings_form_submit function Submit the settings form. Any values returned will be saved.
backup_migrate_filter::restore_settings_form_validate function Get the form for the settings for this filter.
backup_migrate_filter::weight function Get the weight of the filter for the given op.