The Trongate Class
This is the foundation class for all Trongate controllers. It provides essential functionality including view rendering, dynamic module loading, lazy instantiation of framework classes, and support for both parent and child module architectures. Every controller in a Trongate application extends this base class.
module()
Loads a module using the Modules class. This method serves as an alternative way of invoking the load method from the Modules class. It simply instantiates a Modules object and calls its load method with the provided target module name.
template()
Renders a specific template view by calling a corresponding method in the Templates controller class.
upload_file()
Uploads a file using Trongate's inbuilt File class.
upload_picture()
Handles picture uploads within the Trongate framework with optional thumbnail generation. This method processes uploaded images, performs validation, handles resizing, and optionally generates thumbnails based on the provided configuration.
view()
Renders a view file with optional data. This method can either display the view on the browser or return the generated contents as a string.