|
From: | Manuel Muñoz |
Subject: | Re: [Dolibarr-dev] Hooks for ordercard |
Date: | Mon, 16 Jul 2012 16:37:08 -0700 (PDT) |
Dear Eldy:
Thanks for your fast reply. I'm actually working in the 3.2 version.
After reading this on the wiki it got me confused:
class ActionsYourModuleName // extends CommonObject { /** Overloading the doActions function : replacing the parent's function with the one below * @param parameters meta datas of the hook (context, etc...) * @param object the object you want to process (an invoice if you are in invoice module, a propale in propale's module, etc...) * @param action current action (if set). Generally create or edit or null * @return void */ function doActions($parameters, $object, $action) { print_r($parameters); echo "action: ".$action; print_r($object); if ($parameters->context == 'somecontext') { // do something only for the context 'somecontext' } } }
Dear Developevelopment and coding <address@hidden>
i'm trying to implement a hook for the ordercard context overloading "formObjectOptions" function
this is the print_f for the $parameters object
array ( [colspan] => colspan="2" [context] => searchform:leftblock:toprightmenu:ordercard ).
the question is: how can i validate that the context es actually "ordercard"? what type of data i the element context in this case?
already tried with ststr and substr function, but i don't seem to get a match.
Thanks in advance for all your comments
_______________________________________________ Dolibarr-dev mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
[Prev in Thread] | Current Thread | [Next in Thread] |