Skip to content

Instantly share code, notes, and snippets.

@Blair2004
Created January 25, 2020 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blair2004/bb69f39ad56fb122d2da645fefca8572 to your computer and use it in GitHub Desktop.
Save Blair2004/bb69f39ad56fb122d2da645fefca8572 to your computer and use it in GitHub Desktop.
create a frontend UI for NexoPOS
<?php
class Actions extends Tendoo_Module {
public function load_frontend()
{
include_once( dirname( __FILE__ ) . '/../file/to/your/controller.php' );
$controller = new YourController;
if ( $this->uri->segment(1) === '' && $this->uri->segment(2) === null ) {
return $controller->index();
} else if ( $this->uri->segment(1) === 'store' ) {
return $controller->store(); // example
}
}
}
// mmust have registered a hook $this->events->add_action( 'load_frontend', [ $this->actions, 'load_frontend' ]); on the module main class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment