模块开发: Difference between revisions

Jump to navigation Jump to search
Line 514: Line 514:
在Dolibarr中禁用并重新激活您的模块,然后应该会出现菜单项(如果 “enabled”为真)。
在Dolibarr中禁用并重新激活您的模块,然后应该会出现菜单项(如果 “enabled”为真)。


==新增权限 (可选)==
==设置您自己的权限 (可选)==
'''When''': If you want to add new permissions.
'''何时''': 如果要添加新权限。
 
模块将其管理的权限定义,放在第一步中创建的模块描述符文件中完成。更改行:


The way to define permissions that will manage your module is done inside the module descriptor created previously.
Modify line
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
$this->rights_class = 'mymodule'
$this->rights_class = 'mymodule'
</syntaxhighlight>
</syntaxhighlight>
with correct value for mymodule.


Then you must fill the array $this->rights with as many entries than different permissions you need to manage.
录入正确的 myModule 值。
 
然后在 $this->rights 数组中填充与要管理的不同权限一样多的条目。


<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
715

edits

Navigation menu