This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/plugins/product/EXAMPLE.php

118 lines
2.9 KiB
PHP
Raw Normal View History

<?php
/**
* AgileBill - Open Billing Software
*
* This body of work is free software; you can redistribute it and/or
* modify it under the terms of the Open AgileBill License
* License as published at http://www.agileco.com/agilebill/license1-4.txt
2009-08-03 04:10:16 +00:00
*
* Originally authored by Tony Landis, AgileBill LLC
*
* Recent modifications by Deon George
*
* @author Deon George <deonATleenooksDOTnet>
* @copyright 2009 Deon George
* @link http://osb.leenooks.net
*
* @link http://www.agileco.com/
* @copyright 2004-2008 Agileco, LLC.
* @license http://www.agileco.com/agilebill/license1-4.txt
2009-08-03 04:10:16 +00:00
* @author Tony Landis <tony@agileco.com>
* @package AgileBill
2009-08-03 04:10:16 +00:00
* @subpackage Plugins
*/
2009-08-03 04:10:16 +00:00
require_once PATH_MODULES.'product/base_product_plugin.inc.php';
/**
2009-08-03 04:10:16 +00:00
* Example Product Plugin - use this template to write your own plugins
*
* @package AgileBill
* @subpackage Plugins
*/
2009-08-03 04:10:16 +00:00
class plgn_prov_EXAMPLE extends base_product_plugin {
# Plugin Name
protected $name = 'EXAMPLE'; /* Change this to your plugin name! */
# If this plugin provisions remote services
public $remote_based = false;
/**
* Provision new service
*
* Some available variables:
* * All the fields on the account table, eg: id,username,email,first_name,last_name
* $this->account['username'];
* * All the fields in the service table, eg: id,host_username,host_password
* $this->service['id'];
* * All the fields captured by the custom product plugin configuration template
* $this->plugin_data['my_field'];
*/
protected function p_new() {
# Do some background logging of what is going on
global $C_debug;
$C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true));
return true;
}
/**
* Modify service
*/
protected function p_edit() {
# Do some background logging of what is going on
global $C_debug;
$C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true));
return true;
}
/**
* Suspend service
*/
protected function p_inactive() {
# Do some background logging of what is going on
global $C_debug;
$C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true));
return true;
}
/**
* Activate service
*/
protected function p_active() {
# Do some background logging of what is going on
global $C_debug;
$C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true));
return true;
}
/**
* Delete service
*/
protected function p_delete() {
# Do some background logging of what is going on
global $C_debug;
$C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true));
2009-08-03 04:10:16 +00:00
return true;
}
2009-08-03 04:10:16 +00:00
/**
* Delete items from a cart
* Return is not used
*/
public function delete_cart($VAR,$cart) {
return;
}
2009-08-03 04:10:16 +00:00
/**
* Validate items added to cart
*/
public function validate_cart($VAR,$cart) {
return true;
}
}
2009-08-03 04:10:16 +00:00
?>