开发文档: Difference between revisions

no edit summary
(Created page with "<keywords content="developer, development, documentation, guide, doc, tutorial, usage, help, api, coding, standard, rules" /> This page is main index of documents relating to dev...")
 
No edit summary
Line 1: Line 1:
<keywords content="developer, development, documentation, guide, doc, tutorial, usage, help, api, coding, standard, rules" />
<keywords content="developer, development, documentation, guide, doc, tutorial, usage, help, api, coding, standard, rules" />
This page is main index of documents relating to developer documentation. For user documentation, [[User documentation|see here]].
This page is main index of documents relating to developer documentation. For user documentation, [[User documentation|see here]].
{{Template用户手册}}
{{TemplateMainPageZh}}




 
= 开发组织和工具 =
= Development organization and tools =
本章包含在开始Dolibarr的任何开发之前必须阅读的全局信息。
This chapter contains global information that must be read before starting any development on Dolibarr.
# [[Dolibarr Project|Organization of project]]
# [[Dolibarr Project|Organization of project]]
# [[To known before to start|To be known before starting to develop]]
# [[To known before to start|To be known before starting to develop]]
Line 12: Line 13:
# [[FAQ_Get,update_project_sources|Get or update sources of a development version]]
# [[FAQ_Get,update_project_sources|Get or update sources of a development version]]


= Coding rules and best practices =
= 代码规则和最佳实践 =
# [[Prerequisite|Prerequisites]]
# [[Prerequisite|Prerequisites]]
# [[Language and development rules|Language and development rules (PHP, SQL, HTML)]]
# [[Language and development rules|Language and development rules (PHP, SQL, HTML)]]
# [[:Category:Table SQL|List of tables]]
# [[:Category:Table SQL|List of tables]]
# Tree structure of files and classes are available in the [http://doxygen.dolibarr.org/ doxygen generated documentation]
# 文件结构和可用类: [http://doxygen.dolibarr.org/ doxygen generated documentation]


= List of modules =
= 模块清单 =
Technical documentation on standard business modules is available in each module's developer documentation pages. Choose the appropriate page you are interested in:
标准的业务模块的技术文档可在每个模块的开发文档页中找到。选择你感兴趣的合适页面:


* [[:Category:List of Modules (developer)‎|List of standard modules]]
* [[:Category:List of Modules (developer)‎|List of standard modules]]
* [[:Category:Complementary modules|List of complementary modules]]
* [[:Category:Complementary modules|List of complementary modules]]


= To develop a new module/addon for GUI =
= 开发一个新的GUI模块 =
This section describes how to develop a new module changing the Dolibarr user interface. This can be screens, themes, data, its own CSS stylesheet, source code or all of this.
本节描述了如何开发一个新的模块来改变Dolibarr用户界面。这可以是屏幕、主题、数据、它自己的CSS样式表、源代码或所有这一切。


Script development is not included in this section (this is described in the next chapter).
脚本开发不包括在本节中(这将在下一章中描述)。


To develop your own module, check the [[Module development]] tutorial.
要开发自己的模块,请检查 [[Module development]] 。


= To develop a batch or command line script =
= 开发批处理或命令行脚本 =
This chapter describes how to develop command line scripts to execute tasks in Dolibarr (read, update data...).
本章描述了如何开发命令行脚本来执行Dolibarr(Read,Update DATA…)中的任务。
Making modifications to the graphical user interface (GUI) is not included in this chapter. See the previous chapter for this.


To develop a script, like a cron script or a command line import tool to import data from an external source, you can have a look at the [[Script development]] page.
在本章中不包括对图形用户界面(GUI)的修改。请参阅上一章。


= Technical components of Dolibarr =
要开发一个脚本,像一个CRON脚本或命令行导入工具从外部源导入数据,您可以查看 [[Script development]] 。
== Tree structure ==
The path hierarchy of the current version files is available from the [http://doxygen.dolibarr.org/ doxygen generated documentation] (similar to generated "javadoc" documentation).


Paths to use to add new files by a new module are defined in the documentation to develop a new module (see [[Module development]]).
= Dolibarr的技术部件  =
== 树形结构 ==
当前版本文件的路径层次结构可从 [http://doxygen.dolibarr.org/ doxygen generated documentation] (类似于生成的“JavaDoc”文档).


== Setup storage ==
新文档中添加新文件的路径定义在开发新模块的文档中。 (见 [[Module development]]).
There are 3 places for Dolibarr setup parameters.
* Dolibarr technical setup parameters (authentication mode, database logins and storage area for files) are defined in only one setup file, conf/conf.php. See [[Configuration file]] for more information.
* Global features parameters are stored in [[Table llx_const]]. See the [[Constants]] page for more information.
* Feature parameters specific to a user are stored in [[Table llx_user_param]]. See the [[Constants]] page for more information.


== Business objects ==
== 设置存储 ==
See page [[Business Objects]]
Dolibarr设置参数有3个位置。
* DoiBARR技术设置参数(身份验证模式、数据库登录和文件存储区域)在设置文件中定义:“conf/conf.php”。见 [[Configuration file]]。
* 全局功能参数存储在 [[Table llx_const]]。见 [[Constants]] 。
* 用户功能参数存储在 [[Table llx_user_param]]. 见 [[Constants]] 。


== Menus system ==
== 业务对象 ==
See [[Menus system]].
见 [[Business Objects]]


== Tabs system ==
== 菜单 ==
See [[Tabs system]].
见 [[Menus system]].


== Skins system ==
== 选项卡 ==
See [[Skins]].
见 [[Tabs system]].


== Box system ==
== 主题 ==
See [[Box system]].
见 [[Skins]].


== Authentication system ==
== 信息框 ==
See [[Authentication]].
见 [[Box system]].


== Permission system ==
== 身份认证 ==
See [[Permissions En|Permissions]].
见 [[Authentication]].


== Translation system ==
== 权限 ==
See [[Translation system]].
见 [[Permissions En|Permissions]].


== Error management ==
== 翻译 ==
See [[Error reporting|Error reporting]].
见 [[Translation system]].


== Canvas system ==
== 错误信息 ==
Canvas is a developer feature to replace screens to create, update or view a record (products, thirdparties, contacts, ...). For example, you can replace the input form used to create a new third party, or its editing form, or replace its viewing template.
见 [[Error reporting|Error reporting]].
 
== 画布 ==
画布是替代屏幕显示的开发功能。以创建、更新或查看记录(产品,第三方,联系人,…)。例如,您可以替换掉系统自带的“新建第三方”的窗体,或者“修改第三方”的窗体,或者替换掉查看模板。
   
   
See [[Canvas development]].
见 [[Canvas development]].


== Triggers system ==
== 触发器 ==
Triggers are a development feature to execute personalized code during a Dolibarr "business event" (creation of an invoice, deleting a user, update of third party, etc...), and only for a business event. To personalize code for other contexts, see the '''Hooks system''' chapter instead.
触发器是在Dolibarr“业务事件”(创建发票、删除用户、更新第三方等)中执行个性化代码的开发功能,仅用于业务事件。其他情景的个性化代码,请查看“钩子”章节。


For triggers usage, see [[Interfaces Dolibarr toward foreign systems|this page]].
见 [[Interfaces Dolibarr toward foreign systems|this page]].


== Hooks system ==
== 钩子 ==
See [[Hooks system]].
见 [[Hooks system]].


== Variable substitution system ==
== 变量代换 ==
See [[Variable substitution system]].
见 [[Variable substitution system]].


== Web services ==
== Web服务 ==
Dolibarr can be setup to provide some services.
Dolibarr可以设置提供一些服务。


See [[Module Web Services]].
见 [[Module Web Services]].


== Files/Documents storage management ==
== 文件存储 ==
See [[Generated documents]].
见 [[Generated documents]].


== Numbering modules ==
== 编号模块 ==
For each entity created in the application, Dolibarr assigns a reference. In order to adapt the reference to any use, Dolibarr use modules to define the reference generation rule. Several standard modules are supplied. Some are generic and are used to define the numbering mask (number on x characters, with or without prefix, including the date or not, etc.), which can meet most needs. However, there are still cases where the modules provided don't meet the needs. In this case it is necessary to develop a custom numbering module.
对于在系统中创建的每个实体,Dolibarr自动分配引用。为了适应任何使用的参考,Dolibarr使用模块来定义引用生成规则。系统提供了几个标准模块。有些是通用的,用于定义数字掩码(字符有几位数,有或没有前缀,是否包括日期,等等),它们可以满足大多数需要。然而,仍然存在所提供的模块不满足需要的情况。在这种情况下,有必要开发自定义编号模块。


For more information, see [[Create numeration module|Create numbering module]].
见 [[Create numeration module|Create numbering module]].


== Document templates and documents generation ==
== 模板 ==


More documentation about document generation from templates is available to [[Create a PDF document template]] or [[Create an ODT document template]].
关于模板生成文档的更多文档见 [[Create a PDF document template]] 或 [[Create an ODT document template]].


== Extrafields ==
== 附加字段 ==
See [[Extrafields]].
见 [[Extrafields]].


== Other internal function ==
== 其他内部功能 ==
There are many internal libraries your code can use.
您的代码可以使用许多内部库。
You may find a lot of generic functions in the functions.lib.php, functions2.lib.php or admin.lib.php. Any function found in htdocs/core/lib/*.lib files can be used.


'''To specify a requirement based on Dolibarr version number'''
您可以在functions.lib.php、functions2.lib.php或admin.lib.php中找到大量的函数。也可以使用在htdocs/core/lib/*.lib文件中找到的任何函数。


For example, to make a condition based on requiring Dolibarr version > 3.5, you can use versioncompare and versiondolibarrarray found in admin.lib.php:
 
'''根据Dolibarr版本号指定需求'''
 
例如,为了创建一个Dolibarr版本>3.5的环境,可以使用admin.lib.php中发现的versioncompare和versiondolibarrarray:


<source lang="php">
<source lang="php">
Line 127: Line 131:
</source>
</source>


= Mass exports/imports =
= 批量导出/导入 =
# [[Mass imports]]
# [[Mass imports]]
# [[Module Exports En|Mass exports]]
# [[Module Exports En|Mass exports]]


= Interfaces and links with other applications =
= 与其他应用程序的接口和链接 =
# [[Interfaces Dolibarr toward foreign systems]] or toward Dolibarr (Dolibarr Triggers)
# [[Interfaces Dolibarr toward foreign systems]] or toward Dolibarr (Dolibarr Triggers)
# [[Interfaces from foreign systems toward Dolibarr]]
# [[Interfaces from foreign systems toward Dolibarr]]
Line 138: Line 142:
= FAQ =
= FAQ =
All FAQs are available through the FAQ index page [[:Category:FAQ EN|FAQ EN]]
All FAQs are available through the FAQ index page [[:Category:FAQ EN|FAQ EN]]
--[[User:R.ivnun|Roger-QQ12464313]] 09:00, 19 July 2018 (UTC)
513

edits