If you want to customize ZenTao, you should know how to find the codes you want to change. Now you have an understanding of ZenTao directory structure, so let’s look at how ZenTao requests can correspond to the codes.
1. Find the control method
The control method is the entry to each page. Let’s look at an example bug-browse-1.html or /?m=bug&f=browse&productID=1&t=html. bug-browse-1.html is the browse method to visit the bug module; 1 is the first parameter and html is the access type of the page. Similarly, /?m=bug&f=browse&productID=1&t=html, m means the name of the module, f is the name of the method and the rest is the parameter list. Then you can find the source code of browse method in module/bug/control.php in ZenTao .
2. Invoke in the control method
Now that we have known where the entry function is, let’s look at what is in it.
$this->bug means the invoke model in the bug module. The corresponding file is module/bug/model.php.
$this->loadmodel ('tree')->xxx means to load model of the tree module and its corresponding file is in module/tree/model.php.
$this->app->loadClass('pager') means to load a lib and its corresponding file is in lib/pager/pager.class.php.$this->lang->bug->xxx is defined in module/bug/lang/zh-cn.php and the zh-cn is the language determined by the operating language of the current user.
$this->display() calls the template file which has the same name as the current method in the directory of View. For example, the corresponding template file to view bugs is module/bug/view/browse.html.php.