mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
Modif mineure pour modif massive
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@28 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
parent
766d279942
commit
48480974d9
4
db.sql
4
db.sql
@ -1,12 +1,12 @@
|
|||||||
CREATE TABLE `glpi_plugin_example` (
|
CREATE TABLE `glpi_plugin_example` (
|
||||||
`ID` int(11) NOT NULL,
|
`ID` int(11) NOT NULL auto_increment,
|
||||||
`name` varchar(255) collate utf8_unicode_ci default NULL,
|
`name` varchar(255) collate utf8_unicode_ci default NULL,
|
||||||
`FK_dropdown` int(11) NOT NULL default '0',
|
`FK_dropdown` int(11) NOT NULL default '0',
|
||||||
`deleted` smallint(6) NOT NULL default '0',
|
`deleted` smallint(6) NOT NULL default '0',
|
||||||
`is_template` smallint(6) NOT NULL default '0',
|
`is_template` smallint(6) NOT NULL default '0',
|
||||||
`tplname` varchar(255) collate utf8_unicode_ci default NULL,
|
`tplname` varchar(255) collate utf8_unicode_ci default NULL,
|
||||||
PRIMARY KEY (`ID`)
|
PRIMARY KEY (`ID`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
CREATE TABLE `glpi_dropdown_plugin_example` (
|
CREATE TABLE `glpi_dropdown_plugin_example` (
|
||||||
`ID` int(11) NOT NULL auto_increment,
|
`ID` int(11) NOT NULL auto_increment,
|
||||||
|
14
setup.php
14
setup.php
@ -76,10 +76,18 @@ function plugin_init_example() {
|
|||||||
$PLUGIN_HOOKS['add_javascript']['example']="example.js";
|
$PLUGIN_HOOKS['add_javascript']['example']="example.js";
|
||||||
$PLUGIN_HOOKS['add_css']['example']="example.css";
|
$PLUGIN_HOOKS['add_css']['example']="example.css";
|
||||||
|
|
||||||
// Params : plugin name - string type - number - tabke - form page
|
// Params : plugin name - string type - ID - class - table - form page
|
||||||
pluginNewType('example',"PLUGIN_EXAMPLE_TYPE",1001,"glpi_plugin_example","example.form.php");
|
pluginNewType('example',"PLUGIN_EXAMPLE_TYPE",1001,"pluginExample","glpi_plugin_example","example.form.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class pluginExample extends CommonDBTM {
|
||||||
|
function pluginExample () {
|
||||||
|
$this->table="glpi_plugin_example";
|
||||||
|
$this->type=PLUGIN_EXAMPLE_TYPE;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Get the name and the version of the plugin - Needed
|
// Get the name and the version of the plugin - Needed
|
||||||
function plugin_version_example(){
|
function plugin_version_example(){
|
||||||
@ -395,4 +403,6 @@ function plugin_central_action_example(){
|
|||||||
function cron_plugin_example(){
|
function cron_plugin_example(){
|
||||||
echo "tttt";
|
echo "tttt";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user