Extend XenForo_Search_SourceHandler_Abstract

r1pe

Member
Hello,

I have a question regarding the XenForo_Search_SourceHandler_Abstract class. I want to extend the method "processConstraints". Controllers and Models can be easily extended by creating an event listener like "load_class_controller" or "load_class_model". How I can do this in abstract classes? I found the "search_source_create" event listener but I don't know how to use it and if this the right one for extending the abstract class.

Can someone give me a short example how I can extend the XenForo_Search_SourceHandler_Abstract class?

Thanks in advanced.
 
You can't extend abstract classes directly, only normal classes that are instantiated.

The search_source_create event can be used to replace the default source handler. You could duplicate XenForo_Search_SourceHandler_MySqlFt, extend processConstraints in your new source handler, then specify that source handler using the search_source_create event.
 
Back
Top Bottom