pagekit icon indicating copy to clipboard operation
pagekit copied to clipboard

Console Modules/Extensions

Open crwgregory opened this issue 8 years ago • 7 comments

This request is to allow any module with a type of 'console' to be loaded into the application before the 'console.init' event is called, but also allows for future development by adding a getType function in the module manager that returns any registered modules of a specific type.

Currently modules don't get loaded before the 'console.init' event is called and this is limiting if you want to build a pagekit extension/module that extends the pagekit console.

  • [x] I have read and followed the contribution guide: https://github.com/pagekit/pagekit/blob/develop/.github/CONTRIBUTING.md
  • [x] The destination branch of the pull request is the develop branch

crwgregory avatar Jul 11 '16 18:07 crwgregory

An example of what kind of extension this feature would allow for: https://github.com/drunken-kungfu/pagekit-template-generator

crwgregory avatar Jul 13 '16 14:07 crwgregory

I would like this to merged in. Something like this could be used to create a custom command running on a cron job, which could have several advantages for clearing cache, generating reports, post processing, and a bunch of other things.

gholleyd avatar Aug 02 '16 20:08 gholleyd

Indeed, this can be quite useful. But it has to be secured that no extension break the console app, because the console app should also serve as a "rescue tool", if some fatal errors preventing the usage in the browser.

malte-christian avatar Aug 03 '16 11:08 malte-christian

@MalteScharenberg How do you imagine something like that working? Could you give an example of a situation where you would need to use the console as a "rescue tool" and I can try to implement a safety mechanism into the pull request.

crwgregory avatar Aug 03 '16 14:08 crwgregory

Need this feature urgently. Maybe it would be an option to start ./pagekit --safe which does not include any extensions at all - this could be used to recover a pagekit-instance in case of emergency.

ahoiroman avatar Jan 30 '17 09:01 ahoiroman

Any news on that?

ahoiroman avatar Dec 07 '17 11:12 ahoiroman

I haven't worked with pagekit for over a year now. If you are wanting to implement this feature feel free to get into the pull request and add in a safety feature. Shouldn't be to hard.

crwgregory avatar Dec 07 '17 16:12 crwgregory