Le 08/09/2012 10:46, Remi Collet a écrit :
> - should others plugin could use this feature ?

Already available

Juste need to add (in init)

if (method_exists("PluginBehaviorCommon", "addCloneType")) {
        PluginBehaviorCommon::addCloneType("classename");
}

The class could also provides (if needed) preClone and postClone
methods. See PluginBehaviorsProfile and PluginBehaviorsRule for ex.


Plugins could also add actions after clone (of core types).

In "add_item" hook (testing "_old_id") or (which seems cleaner) on new
(temporary raised by behaviors plugins) "clone_item" hook. See
PluginAppliancesProfile for ex.



Remi.

_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to