Hello, everyone.
I followed the documentation to implement a hook in my custom module, specifically I would like to modify the table that lists the sub lines of an object. The hooks are printObjectLine to print the body of the table with the lines in it and printObjectTitleLine to print the header.
I was able to create them following this: Hooks System, but I need the functions that are called to be different based on the object in question.
How do I create hooks with the same name but different content based on the context from which they are called?
The funcrion of the hook should receive the object, so you can inside this function do test to execute different code according to object…
hi eldy, thank you for your response. I had already considered doing this, I think I will continue on this path as I don’t think there is any alternative.
What I was trying to know was if it really possible to define hooks with the same name that are called based on the context, more for a matter of tidiness and cleanliness of the code.
However, I think your answer is valid.