Created
January 25, 2020 13:38
-
-
Save Blair2004/bb69f39ad56fb122d2da645fefca8572 to your computer and use it in GitHub Desktop.
create a frontend UI for NexoPOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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