Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titlePrerequisite

This documentation assumes you already understand the hooking process for BMO and will not show that information. Please go HERE for information on BMO Hooks

Introduction

In some situations you may wish to hook in to the backup process with your module. Below is the places where hooking has been added.

Universal Hooks

NamespaceClassCalling MethodArgumentsUseDescription

FreePBX\modules

BackupgetBackupSettingsDisplay($id);

$id: the id of the backup settings are being requested for


Code Block
languagephp
public function getBackupSettingsDisplay($id){
  $settings = !empty($id) ? $this->getAll('backup_'.$id) : [];
  return load_view(__DIR__.'/views/backupSettings.php',$settings);
}


Used to add module settings to the module grid on the backup form. These in turn may be added to the modules json file for additional processing.
FreePBX\modulesBackupprocessBackupSettings(id, $settings);

$id: the id of the backup settings are being processed for

$settings: Settings specific to this module saved from the backup


Code Block
languagephp
public function processBackupSettings($id, $settings){
  $this->setMultiConfig($settings,'backup_'.$id);
}


Used to save/process module settings from the backup form.