(12-03-2018, 06:56 AM)kilishan Wrote: Interesting idea, but it has a very real problem that filters expect to be able to modify the request/response or return their own response, and calling a filter within an event negates all of those abilities.
The filter you are trying to replicate from Wordpress is fundamentally different enough from the Controller Filters that CI provides that I don't think they're compatible.
To allow filters on content, you'd be better served creating something new and specific for that use, I think.
Thank you for your opinion.
For now, I think I'll have to use above code I added.
That is a quite simple way, if there isn't another simple awesome way.
By the way, CI4 Events concept is very nice. I think this is similar to Action (Hook) concept of WordPress.
So, I just added that triggerFilter (Filter Hook) function.