module.php 919 B

1234567891011121314151617181920
  1. <?php namespace frieren\core;
  2. /* Code modified by Frieren Auto Refactor */
  3. /* The class name must be the name of your module, without spaces. */
  4. /* It must also extend the "Module" class. This gives your module access to API functions */
  5. class _MODULE_NAME extends Controller
  6. {
  7. protected $endpointRoutes = ['getContents'];
  8. public function getContents() // This is the function that will be executed when you send the request "getContents".
  9. {
  10. $this->responseHandler->setData(array("success" => true, // define $this->response. We can use an array to set multiple responses.
  11. "greeting" => "Hey there!",
  12. "content" => "This is the HTML template for your new module! The example shows you the basics of using HTML, AngularJS and PHP to seamlessly pass information to and from Javascript and PHP and output it to HTML."));
  13. }
  14. }