mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
modify example for ticket #3955
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@203 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
parent
2814d6dc83
commit
5fadd64292
25
hook.php
25
hook.php
@ -666,4 +666,29 @@ function plugin_example_postinit() {
|
|||||||
// do something
|
// do something
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook to add more data from ldap
|
||||||
|
* fields from plugin_retrieve_more_field_from_ldap_example
|
||||||
|
*
|
||||||
|
* @param $datas array
|
||||||
|
*
|
||||||
|
* @return un tableau
|
||||||
|
**/
|
||||||
|
function plugin_retrieve_more_data_from_ldap_example(array $datas) {
|
||||||
|
return $datas;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook to add more fields from LDAP
|
||||||
|
*
|
||||||
|
* @param $fields array
|
||||||
|
*
|
||||||
|
* @return un tableau
|
||||||
|
**/
|
||||||
|
function plugin_retrieve_more_field_from_ldap_example($fields) {
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
?>
|
?>
|
@ -148,6 +148,9 @@ 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';
|
||||||
|
|
||||||
|
// request more attributes from ldap
|
||||||
|
//$PLUGIN_HOOKS['retrieve_more_field_from_ldap']['example']="plugin_retrieve_more_field_from_ldap_example";
|
||||||
|
|
||||||
// Retrieve others datas from LDAP
|
// Retrieve others datas from LDAP
|
||||||
//$PLUGIN_HOOKS['retrieve_more_data_from_ldap']['example']="plugin_retrieve_more_data_from_ldap_example";
|
//$PLUGIN_HOOKS['retrieve_more_data_from_ldap']['example']="plugin_retrieve_more_data_from_ldap_example";
|
||||||
|
|
||||||
@ -161,7 +164,7 @@ function plugin_init_example() {
|
|||||||
|
|
||||||
$PLUGIN_HOOKS['post_init']['example'] = 'plugin_example_postinit';
|
$PLUGIN_HOOKS['post_init']['example'] = 'plugin_example_postinit';
|
||||||
|
|
||||||
// CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm();
|
// CSRF compliance : All actions must be done via POST and forms closed by Html::closeForm();
|
||||||
$PLUGIN_HOOKS['csrf_compliant']['example'] = true;
|
$PLUGIN_HOOKS['csrf_compliant']['example'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user