Jump to content

Newbie question about functions inside a module


Raullara

Recommended Posts

Hi everyone again,

 

Now i have a simple question, im trying to organize my code in my module, and i want to do my own functions, but no matter how i create and call the functions, is not working.

 

 public function __construct() {

 

 public function install() {

 

 public function unistall() {

 

 public function displayForm() {

 

public function myTest() {
        $output = null;
        $output .= $this->displayError($this->l('test'));
    }
 
public function getContent() {
 
        $output = null;
 
        if (Tools::isSubmit('submit' . $this->name)) {
            
            $this->myTest();
            $output .= $this->displayError($this->l('test'));
 
ETC ETC.
 
As you can see, i have the normal methods, and my own method called myTets().
 
In the getContent method, i have the call to my method, folowed by the same line i have in my method.
 
One is showing, the other not. I think i'm not doing anything wrong, just calling the function.

 

 

Thanks in advance as always!

Edited by Raullara (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...