HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Controllers in Plugins
I am writing a plugin that adds a page and I have run into an issue with making a pretty route for it (see below). I'm considering adding a controller to the plugin and it got me thinking: is it alright to add controllers to plugins and simple one-method controllers in general, or is it better to save controllers for… -
Re: Controllers in Plugins
That code works flawless in a setting screen. I've used this in a plugin I've never released. My approach was making the route translatable. That way I didn't have to mess around with a setting ;) Although your problem is already solved: x00 often uses a lot of controllers in his plugins. I have thought about doing this in… -
Re: Controllers in Plugins
-
Re: Controllers in Plugins
@vrijvlinder, that would be good to place on the settings page as a "add and use /twitchpage route instead of /plugin/twitchpage" check box, but is there a way to execute that logic when the settings are saved with the ConfigurationModule? Edit: You probably mean to run that code on the plugin enable and disable events--or… -
Re: Controllers in Plugins
@R_J, I didn't know x00 used controllers in his plugins. I might take a look to see how they're put into effect. =) Also, controllers being supported in plugins is a recent addition since Vanilla 2.2. It'll be interesting to see how developers incorporate controllers in their plugins. In case anyone finds it useful, here… -
Re: Controllers in Plugins
-
Re: Controllers in Plugins
-
Re: Controllers in Plugins
A controller is definitely the best way to go about this. It's straightforward, clear, and less prone to future issues. @Bleistivt is correct: applications will one day be folded into plugins. There is precious little difference between them at this point. Personally I wouldn't start a new application for anything less…
8 results