You are here

class backup_migrate_filter in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/filters.inc \backup_migrate_filter
  2. 8.3 includes/filters.inc \backup_migrate_filter
  3. 6.3 includes/filters.inc \backup_migrate_filter
  4. 6.2 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 207
All of the filter handling code needed for Backup and Migrate.

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

  /**
   * Get the weight of the filter for the given op.
   */
  public 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.
   */
  public function backup_settings_default() {
    return array();
  }

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

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

  /**
   * Submit the settings form. Any values returned will be saved.
   */
  public function backup_settings_form_submit($form, &$form_state) {
  }

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

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

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

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

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

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

  /**
   * Called on a backup file after the backup has been completed.
   */
  public function backup($file, $settings) {
    return $file;
  }

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

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

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

  /**
   * This function is called immediately prior to restore.
   */
  public function pre_restore($file, $settings) {
  }

  /**
   * This function is called immediately post restore.
   */
  public function post_restore($file, $settings) {
  }

}

Members

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