Find the Code

2016-08-31 09:36:26    tengfei    5814

You have to know where the code is before you change them. Once you understand the directory of Zdoo, let's see how to find those codes.


Locate the code via Control

Let's see an example first. Example :

crm/ order-browse- assignedTo.html crm/index.php?m=order&f=browse&mode=assignedTo

In crm/ order-browse- assignedTo.html, it means browse is the method to access to Order in CRM; the first parameter is assignedTo; the page type is h tml.
In crm/index.php?m=order&f=browse&mode=assignedTo

, CRM is the name of an application; m is the name of a module; f is the name of the method; what is behind that is parameter list.

Now let's take a look at Zdoo source code, the method to browse in app/crm/order/control.php

Calling in Control


$this->order is to call model in CRM, so the file is at app/crm/order/model.php.


$this->loadmoel('order', 'crm')->xxx is to load modlel in Order of CRM, and its  file is at app/crm/order/model.php.


$this->app->loadClass('pager') is to load a lib, and corresponding file is at lib/pager/pager.class.php.



$this->lang->bug->xxx is defined in app/crm/order/lang/zh-cn.php. zh-cn can be changed to language your need.

Following $this->display() is the call of templates with the same method in the directory of view. For example, the method to browse an order, and its file is at app/order/view/browse.html.php.


Application

App directory in Zdoo has subdirectories correspond to CRM, OA, TEAM, and public modules in Zdoo.