Hooking Backup Settings with a module

Prerequisite

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

Namespace

Class

Calling Method

Arguments

Use

Description

Namespace

Class

Calling Method

Arguments

Use

Description

FreePBX\modules

Backup

getBackupSettingsDisplay($id);

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

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\modules

Backup

processBackupSettings(id, $settings);

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

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

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

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

Return to Documentation Home I Return to Sangoma Support