Ricky Sharma
Ricky Sharma

Reputation: 1919

how to override the already overridden class

Some other custom module has already overridden a third party module's class file(SOME BLOG EXTENSION). After researching I came to know that you can only override once.

Now I also need to override that same core file in my own custom module. As it's already overridden how can accomplish that?

I can not use events because that third party module is not firing any events.

Please suggest. Thanks

Upvotes: 2

Views: 1153

Answers (2)

Ricky Sharma
Ricky Sharma

Reputation: 1919

I Found the problem and the fix. The link is in comment. Sorry for some reason I could post the link here. It goes into comments automatically. So I am writing here incase anyone needed.

Upvotes: 0

JNDPNT
JNDPNT

Reputation: 7465

You can simple chain the different modules... For instance:

A is the original class, B and C are two modules trying to override A. Simple set-up this:

B extends A, C extends B. If you have functions that are both used you can simple call the parent function so they can add their magic.

Upvotes: 2

Related Questions