It looks like you're new here. If you want to get involved, click one of these buttons!
Is it possible to override a core controller from a plugin?
I've done this for a model class, just adding the file into the plugin directory.
Need a custom plugin? Contact me via vanilla private messages | Explore my GitHub repository | See my latest vanilla plugins
You want to override a controller method? It is possible.
You must avoid stuff like this you can, it is the tail wagging the dog. A whole class is a pretty big thing to override. Overriding methods should be a last resort, it is rarely necessary.
Better to reroute, if that is even necessary.
grep is your friend.
Since you can use any model you like there is little reason to override one. You could extend, or create a new one.
The class that I need to override is the search controller class. I need to do that to fit my (search) needs. Unfortunately there isn't any hook in the controller...
You can override methods, you can also reroute and use you own.
Can you explain how to do that (override a controller method)?
it is written in the docs
scroll to magic events.
Thank you, but I've created a controller in a my custom application with custom search model,etc to solve this...
well that is what I'm saying, it is better not to override methods. You might look at how sphinx search does it.