dolibarr  7.0.0-beta
modStripe.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
3  * Copyright (C) 2017 Saasprov <saasprov@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
26 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
27 
28 
33 {
39  function __construct($db)
40  {
41  $this->db = $db;
42 
43  // Id for module (must be unique).
44  // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
45  $this->numero = 50300;
46  // Key text used to identify module (for permissions, menus, etc...)
47  $this->rights_class = 'stripe';
48 
49  // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
50  // It is used to group modules in module setup page
51  $this->family = "other";
52  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
53  $this->name = preg_replace('/^mod/i','',get_class($this));
54  // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
55  $this->description = "Module to offer an online payment page by credit card with Stripe";
56  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
57  $this->version = 'dolibarr';
58  // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
59  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
60  // Where to store the module in setup page (0=common,1=interface,2=other)
61  $this->special = 1;
62  // Name of image file used for this module.
63  // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
64  // If file is in module/img directory, use this->picto=DOL_URL_ROOT.'/module/img/file.png'
65  $this->picto='stripe';
66 
67  // Data directories to create when module is enabled.
68  $this->dirs = array();
69 
70  // Config pages. Put here list of php page names stored in admmin directory used to setup module.
71  $this->config_page_url = array("stripe.php@stripe");
72 
73  // Dependencies
74  $this->depends = array(); // List of modules id that must be enabled if this module is enabled
75  $this->requiredby = array(); // List of modules id to disable if this one is disabled
76  $this->phpmin = array(5,3); // Minimum version of PHP required by module
77  $this->need_dolibarr_version = array(5,0); // Minimum version of Dolibarr required by module
78  $this->langfiles = array("stripe");
79 
80  // Constants
81  $this->const = array(); // List of particular constants to add when module is enabled
82 
83  // New pages on tabs
84  $this->tabs = array();
85 
86  // Boxes
87  $this->boxes = array(); // List of boxes
88  $r=0;
89 
90  // Permissions
91  $this->rights = array(); // Permission array used by this module
92  $r=0;
93 
94  // Main menu entries
95  $this->menus = array(); // List of menus to add
96  $r=0;
97 
98  // Exports
99  $r=1;
100  }
101 }
102 
Description and activation class for module Paybox.
__construct($db)
Constructor.
Class DolibarrModules.
</td >< tdclass="liste_titre"align="right"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="'.$i.'"'.$disabled.'></td >< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"></td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:554
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:104