<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dolibarr.org/index.php?action=history&amp;feed=atom&amp;title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6</id>
	<title>主模块代码框架 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dolibarr.org/index.php?action=history&amp;feed=atom&amp;title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;action=history"/>
	<updated>2026-11-09T09:26:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;diff=40756&amp;oldid=prev</id>
		<title>R.ivnun at 08:10, 16 January 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;diff=40756&amp;oldid=prev"/>
		<updated>2019-01-16T08:10:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:10, 16 January 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  \brief      MyModule module descriptor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  \brief      MyModule module descriptor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; *  模块文件的位置&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  \file       htdocs/mymodule/core/modules/modMyModule.class.php&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  \file       htdocs/mymodule/core/modules/modMyModule.class.php&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  \ingroup    mymodule&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  \ingroup    mymodule&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot;&gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  */&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  //&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;包含文件&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  //&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;包含父类文件&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;include_once DOL_DOCUMENT_ROOT .&amp;#039;/core/modules/DolibarrModules.class.php&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;include_once DOL_DOCUMENT_ROOT .&amp;#039;/core/modules/DolibarrModules.class.php&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  Description and activation class for module MyModule&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  *  Description and activation class for module MyModule&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  */&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;class modMyModule extends DolibarrModules&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;class modMyModule extends DolibarrModules&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki_test:diff::1.12:old-39195:rev-40756 --&gt;
&lt;/table&gt;</summary>
		<author><name>R.ivnun</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;diff=39195&amp;oldid=prev</id>
		<title>R.ivnun at 05:11, 15 August 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;diff=39195&amp;oldid=prev"/>
		<updated>2018-08-15T05:11:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;amp;diff=39195&amp;amp;oldid=38961&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>R.ivnun</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;diff=38961&amp;oldid=prev</id>
		<title>R.ivnun: Created page with &quot;&lt;source lang=&quot;php&quot;&gt; &lt;?php /* Copyright (C) 2004-2018 Laurent Destailleur  &lt;eldy@users.sourceforge.net&gt;  * Copyright (C) ---Put here your own copyright and developer email---  *  ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=%E4%B8%BB%E6%A8%A1%E5%9D%97%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6&amp;diff=38961&amp;oldid=prev"/>
		<updated>2018-07-25T07:05:46Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt; &amp;lt;?php /* Copyright (C) 2004-2018 Laurent Destailleur  &amp;lt;eldy@users.sourceforge.net&amp;gt;  * Copyright (C) ---Put here your own copyright and developer email---  *  ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/* Copyright (C) 2004-2018 Laurent Destailleur  &amp;lt;eldy@users.sourceforge.net&amp;gt;&lt;br /&gt;
 * Copyright (C) ---Put here your own copyright and developer email---&lt;br /&gt;
 *&lt;br /&gt;
 * This program is free software; you can redistribute it and/or modify&lt;br /&gt;
 * it under the terms of the GNU General Public License as published by&lt;br /&gt;
 * the Free Software Foundation; either version 3 of the License, or&lt;br /&gt;
 * (at your option) any later version.&lt;br /&gt;
 *&lt;br /&gt;
 * This program is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 * GNU General Public License for more details.&lt;br /&gt;
 *&lt;br /&gt;
 * You should have received a copy of the GNU General Public License&lt;br /&gt;
 * along with this program. If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * 	\defgroup   mymodule     Module MyModule&lt;br /&gt;
 *  \brief      MyModule module descriptor.&lt;br /&gt;
 *&lt;br /&gt;
 *  \file       htdocs/mymodule/core/modules/modMyModule.class.php&lt;br /&gt;
 *  \ingroup    mymodule&lt;br /&gt;
 *  \brief      Description and activation file for module MyModule&lt;br /&gt;
 */&lt;br /&gt;
include_once DOL_DOCUMENT_ROOT .&amp;#039;/core/modules/DolibarrModules.class.php&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// The class name should start with a lower case mod for Dolibarr to pick it up&lt;br /&gt;
// so we ignore the Squiz.Classes.ValidClassName.NotCamelCaps rule.&lt;br /&gt;
// @codingStandardsIgnoreStart&lt;br /&gt;
/**&lt;br /&gt;
 *  Description and activation class for module MyModule&lt;br /&gt;
 */&lt;br /&gt;
class modMyModule extends DolibarrModules&lt;br /&gt;
{&lt;br /&gt;
	// @codingStandardsIgnoreEnd&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor. Define names, constants, directories, boxes, permissions&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param DoliDB $db Database handler&lt;br /&gt;
	 */&lt;br /&gt;
	public function __construct($db)&lt;br /&gt;
	{&lt;br /&gt;
        global $langs,$conf;&lt;br /&gt;
&lt;br /&gt;
        $this-&amp;gt;db = $db;&lt;br /&gt;
&lt;br /&gt;
		// Id for module (must be unique).&lt;br /&gt;
		// Use here a free id (See in Home -&amp;gt; System information -&amp;gt; Dolibarr for list of used modules id).&lt;br /&gt;
		$this-&amp;gt;numero = 500000;		// TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module&lt;br /&gt;
		// Key text used to identify module (for permissions, menus, etc...)&lt;br /&gt;
		$this-&amp;gt;rights_class = &amp;#039;mymodule&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		// Family can be &amp;#039;crm&amp;#039;,&amp;#039;financial&amp;#039;,&amp;#039;hr&amp;#039;,&amp;#039;projects&amp;#039;,&amp;#039;products&amp;#039;,&amp;#039;ecm&amp;#039;,&amp;#039;technic&amp;#039;,&amp;#039;interface&amp;#039;,&amp;#039;other&amp;#039;&lt;br /&gt;
		// It is used to group modules by family in module setup page&lt;br /&gt;
		$this-&amp;gt;family = &amp;quot;other&amp;quot;;&lt;br /&gt;
		// Module position in the family on 2 digits (&amp;#039;01&amp;#039;, &amp;#039;10&amp;#039;, &amp;#039;20&amp;#039;, ...)&lt;br /&gt;
		$this-&amp;gt;module_position = &amp;#039;90&amp;#039;;&lt;br /&gt;
		// Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this-&amp;gt;family and $this-&amp;gt;module_position. Avoid this)&lt;br /&gt;
		//$this-&amp;gt;familyinfo = array(&amp;#039;myownfamily&amp;#039; =&amp;gt; array(&amp;#039;position&amp;#039; =&amp;gt; &amp;#039;01&amp;#039;, &amp;#039;label&amp;#039; =&amp;gt; $langs-&amp;gt;trans(&amp;quot;MyOwnFamily&amp;quot;)));&lt;br /&gt;
&lt;br /&gt;
		// Module label (no space allowed), used if translation string &amp;#039;ModuleMyModuleName&amp;#039; not found (MyModue is name of module).&lt;br /&gt;
		$this-&amp;gt;name = preg_replace(&amp;#039;/^mod/i&amp;#039;,&amp;#039;&amp;#039;,get_class($this));&lt;br /&gt;
		// Module description, used if translation string &amp;#039;ModuleMyModuleDesc&amp;#039; not found (MyModue is name of module).&lt;br /&gt;
		$this-&amp;gt;description = &amp;quot;MyModuleDescription&amp;quot;;&lt;br /&gt;
		// Used only if file README.md and README-LL.md not found.&lt;br /&gt;
		$this-&amp;gt;descriptionlong = &amp;quot;MyModuleDescription (Long)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;editor_name = &amp;#039;Editor name&amp;#039;;&lt;br /&gt;
		$this-&amp;gt;editor_url = &amp;#039;https://www.example.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		// Possible values for version are: &amp;#039;development&amp;#039;, &amp;#039;experimental&amp;#039;, &amp;#039;dolibarr&amp;#039;, &amp;#039;dolibarr_deprecated&amp;#039; or a version string like &amp;#039;x.y.z&amp;#039;&lt;br /&gt;
		$this-&amp;gt;version = &amp;#039;1.0&amp;#039;;&lt;br /&gt;
		// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)&lt;br /&gt;
		$this-&amp;gt;const_name = &amp;#039;MAIN_MODULE_&amp;#039;.strtoupper($this-&amp;gt;name);&lt;br /&gt;
		// Name of image file used for this module.&lt;br /&gt;
		// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this-&amp;gt;picto=&amp;#039;pictovalue&amp;#039;&lt;br /&gt;
		// If file is in module/img directory under name object_pictovalue.png, use this-&amp;gt;picto=&amp;#039;pictovalue@module&amp;#039;&lt;br /&gt;
		$this-&amp;gt;picto=&amp;#039;generic&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
		// Defined all module parts (triggers, login, substitutions, menus, css, etc...)&lt;br /&gt;
		// for default path (eg: /mymodule/core/xxxxx) (0=disable, 1=enable)&lt;br /&gt;
		// for specific path of parts (eg: /mymodule/core/modules/barcode)&lt;br /&gt;
		// for specific css file (eg: /mymodule/css/mymodule.css.php)&lt;br /&gt;
		$this-&amp;gt;module_parts = array(&lt;br /&gt;
		                        	&amp;#039;triggers&amp;#039; =&amp;gt; 1,                                 	// Set this to 1 if module has its own trigger directory (core/triggers)&lt;br /&gt;
									&amp;#039;login&amp;#039; =&amp;gt; 0,                                    	// Set this to 1 if module has its own login method file (core/login)&lt;br /&gt;
									&amp;#039;substitutions&amp;#039; =&amp;gt; 1,                            	// Set this to 1 if module has its own substitution function file (core/substitutions)&lt;br /&gt;
									&amp;#039;menus&amp;#039; =&amp;gt; 0,                                    	// Set this to 1 if module has its own menus handler directory (core/menus)&lt;br /&gt;
									&amp;#039;theme&amp;#039; =&amp;gt; 0,                                    	// Set this to 1 if module has its own theme directory (theme)&lt;br /&gt;
		                        	&amp;#039;tpl&amp;#039; =&amp;gt; 0,                                      	// Set this to 1 if module overwrite template dir (core/tpl)&lt;br /&gt;
									&amp;#039;barcode&amp;#039; =&amp;gt; 0,                                  	// Set this to 1 if module has its own barcode directory (core/modules/barcode)&lt;br /&gt;
									&amp;#039;models&amp;#039; =&amp;gt; 0,                                   	// Set this to 1 if module has its own models directory (core/modules/xxx)&lt;br /&gt;
									&amp;#039;css&amp;#039; =&amp;gt; array(&amp;#039;/mymodule/css/mymodule.css.php&amp;#039;),	// Set this to relative path of css file if module has its own css file&lt;br /&gt;
	 								&amp;#039;js&amp;#039; =&amp;gt; array(&amp;#039;/mymodule/js/mymodule.js.php&amp;#039;),          // Set this to relative path of js file if module must load a js on all pages&lt;br /&gt;
									&amp;#039;hooks&amp;#039; =&amp;gt; array(&amp;#039;data&amp;#039;=&amp;gt;array(&amp;#039;hookcontext1&amp;#039;,&amp;#039;hookcontext2&amp;#039;), &amp;#039;entity&amp;#039;=&amp;gt;&amp;#039;0&amp;#039;) 	// Set here all hooks context managed by module. To find available hook context, make a &amp;quot;grep -r &amp;#039;&amp;gt;initHooks(&amp;#039; *&amp;quot; on source code. You can also set hook context &amp;#039;all&amp;#039;&lt;br /&gt;
		                        );&lt;br /&gt;
&lt;br /&gt;
		// Data directories to create when module is enabled.&lt;br /&gt;
		// Example: this-&amp;gt;dirs = array(&amp;quot;/mymodule/temp&amp;quot;,&amp;quot;/mymodule/subdir&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;dirs = array();&lt;br /&gt;
&lt;br /&gt;
		// Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module.&lt;br /&gt;
		$this-&amp;gt;config_page_url = array(&amp;quot;setup.php@mymodule&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// Dependencies&lt;br /&gt;
		$this-&amp;gt;hidden = false;			// A condition to hide module&lt;br /&gt;
		$this-&amp;gt;depends = array();		// List of module class names as string that must be enabled if this module is enabled&lt;br /&gt;
		$this-&amp;gt;requiredby = array();	// List of module ids to disable if this one is disabled&lt;br /&gt;
		$this-&amp;gt;conflictwith = array();	// List of module class names as string this module is in conflict with&lt;br /&gt;
		$this-&amp;gt;langfiles = array(&amp;quot;mymodule@mymodule&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;phpmin = array(5,3);					// Minimum version of PHP required by module&lt;br /&gt;
		$this-&amp;gt;need_dolibarr_version = array(4,0);	// Minimum version of Dolibarr required by module&lt;br /&gt;
		$this-&amp;gt;warnings_activation = array();                     // Warning to show when we activate module. array(&amp;#039;always&amp;#039;=&amp;#039;text&amp;#039;) or array(&amp;#039;FR&amp;#039;=&amp;#039;textfr&amp;#039;,&amp;#039;ES&amp;#039;=&amp;#039;textes&amp;#039;...)&lt;br /&gt;
		$this-&amp;gt;warnings_activation_ext = array();                 // Warning to show when we activate an external module. array(&amp;#039;always&amp;#039;=&amp;#039;text&amp;#039;) or array(&amp;#039;FR&amp;#039;=&amp;#039;textfr&amp;#039;,&amp;#039;ES&amp;#039;=&amp;#039;textes&amp;#039;...)&lt;br /&gt;
		//$this-&amp;gt;automatic_activation = array(&amp;#039;FR&amp;#039;=&amp;gt;&amp;#039;MyModuleWasAutomaticallyActivatedBecauseOfYourCountryChoice&amp;#039;);&lt;br /&gt;
		//$this-&amp;gt;always_enabled = true;								// If true, can&amp;#039;t be disabled&lt;br /&gt;
&lt;br /&gt;
		// Constants&lt;br /&gt;
		// List of particular constants to add when module is enabled (key, &amp;#039;chaine&amp;#039;, value, desc, visible, &amp;#039;current&amp;#039; or &amp;#039;allentities&amp;#039;, deleteonunactive)&lt;br /&gt;
		// Example: $this-&amp;gt;const=array(0=&amp;gt;array(&amp;#039;MYMODULE_MYNEWCONST1&amp;#039;,&amp;#039;chaine&amp;#039;,&amp;#039;myvalue&amp;#039;,&amp;#039;This is a constant to add&amp;#039;,1),&lt;br /&gt;
		//                             1=&amp;gt;array(&amp;#039;MYMODULE_MYNEWCONST2&amp;#039;,&amp;#039;chaine&amp;#039;,&amp;#039;myvalue&amp;#039;,&amp;#039;This is another constant to add&amp;#039;,0, &amp;#039;current&amp;#039;, 1)&lt;br /&gt;
		// );&lt;br /&gt;
		$this-&amp;gt;const = array(&lt;br /&gt;
			1=&amp;gt;array(&amp;#039;MYMODULE_MYCONSTANT&amp;#039;, &amp;#039;chaine&amp;#039;, &amp;#039;avalue&amp;#039;, &amp;#039;This is a constant to add&amp;#039;, 1, &amp;#039;allentities&amp;#039;, 1)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		if (! isset($conf-&amp;gt;mymodule) || ! isset($conf-&amp;gt;mymodule-&amp;gt;enabled))&lt;br /&gt;
		{&lt;br /&gt;
			$conf-&amp;gt;mymodule=new stdClass();&lt;br /&gt;
			$conf-&amp;gt;mymodule-&amp;gt;enabled=0;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		// Array to add new pages in new tabs&lt;br /&gt;
        $this-&amp;gt;tabs = array();&lt;br /&gt;
		// Example:&lt;br /&gt;
		// $this-&amp;gt;tabs[] = array(&amp;#039;data&amp;#039;=&amp;gt;&amp;#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mynewtab1.php?id=__ID__&amp;#039;);  					// To add a new tab identified by code tabname1&lt;br /&gt;
        // $this-&amp;gt;tabs[] = array(&amp;#039;data&amp;#039;=&amp;gt;&amp;#039;objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;othermodule-&amp;gt;read:/mymodule/mynewtab2.php?id=__ID__&amp;#039;,  	// To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on &amp;#039;Title2&amp;#039; key.&lt;br /&gt;
        // $this-&amp;gt;tabs[] = array(&amp;#039;data&amp;#039;=&amp;gt;&amp;#039;objecttype:-tabname:NU:conditiontoremove&amp;#039;);                                                     										// To remove an existing tab identified by code tabname&lt;br /&gt;
        //&lt;br /&gt;
        // Where objecttype can be&lt;br /&gt;
		// &amp;#039;categories_x&amp;#039;	  to add a tab in category view (replace &amp;#039;x&amp;#039; by type of category (0=product, 1=supplier, 2=customer, 3=member)&lt;br /&gt;
		// &amp;#039;contact&amp;#039;          to add a tab in contact view&lt;br /&gt;
		// &amp;#039;contract&amp;#039;         to add a tab in contract view&lt;br /&gt;
		// &amp;#039;group&amp;#039;            to add a tab in group view&lt;br /&gt;
		// &amp;#039;intervention&amp;#039;     to add a tab in intervention view&lt;br /&gt;
		// &amp;#039;invoice&amp;#039;          to add a tab in customer invoice view&lt;br /&gt;
		// &amp;#039;invoice_supplier&amp;#039; to add a tab in supplier invoice view&lt;br /&gt;
		// &amp;#039;member&amp;#039;           to add a tab in fundation member view&lt;br /&gt;
		// &amp;#039;opensurveypoll&amp;#039;	  to add a tab in opensurvey poll view&lt;br /&gt;
		// &amp;#039;order&amp;#039;            to add a tab in customer order view&lt;br /&gt;
		// &amp;#039;order_supplier&amp;#039;   to add a tab in supplier order view&lt;br /&gt;
		// &amp;#039;payment&amp;#039;		  to add a tab in payment view&lt;br /&gt;
		// &amp;#039;payment_supplier&amp;#039; to add a tab in supplier payment view&lt;br /&gt;
		// &amp;#039;product&amp;#039;          to add a tab in product view&lt;br /&gt;
		// &amp;#039;propal&amp;#039;           to add a tab in propal view&lt;br /&gt;
		// &amp;#039;project&amp;#039;          to add a tab in project view&lt;br /&gt;
		// &amp;#039;stock&amp;#039;            to add a tab in stock view&lt;br /&gt;
		// &amp;#039;thirdparty&amp;#039;       to add a tab in third party view&lt;br /&gt;
		// &amp;#039;user&amp;#039;             to add a tab in user view&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        // Dictionaries&lt;br /&gt;
		$this-&amp;gt;dictionaries=array();&lt;br /&gt;
        /* Example:&lt;br /&gt;
        $this-&amp;gt;dictionaries=array(&lt;br /&gt;
            &amp;#039;langs&amp;#039;=&amp;gt;&amp;#039;mylangfile@mymodule&amp;#039;,&lt;br /&gt;
            &amp;#039;tabname&amp;#039;=&amp;gt;array(MAIN_DB_PREFIX.&amp;quot;table1&amp;quot;,MAIN_DB_PREFIX.&amp;quot;table2&amp;quot;,MAIN_DB_PREFIX.&amp;quot;table3&amp;quot;),		// List of tables we want to see into dictonnary editor&lt;br /&gt;
            &amp;#039;tablib&amp;#039;=&amp;gt;array(&amp;quot;Table1&amp;quot;,&amp;quot;Table2&amp;quot;,&amp;quot;Table3&amp;quot;),													// Label of tables&lt;br /&gt;
            &amp;#039;tabsql&amp;#039;=&amp;gt;array(&amp;#039;SELECT f.rowid as rowid, f.code, f.label, f.active FROM &amp;#039;.MAIN_DB_PREFIX.&amp;#039;table1 as f&amp;#039;,&amp;#039;SELECT f.rowid as rowid, f.code, f.label, f.active FROM &amp;#039;.MAIN_DB_PREFIX.&amp;#039;table2 as f&amp;#039;,&amp;#039;SELECT f.rowid as rowid, f.code, f.label, f.active FROM &amp;#039;.MAIN_DB_PREFIX.&amp;#039;table3 as f&amp;#039;),	// Request to select fields&lt;br /&gt;
            &amp;#039;tabsqlsort&amp;#039;=&amp;gt;array(&amp;quot;label ASC&amp;quot;,&amp;quot;label ASC&amp;quot;,&amp;quot;label ASC&amp;quot;),																					// Sort order&lt;br /&gt;
            &amp;#039;tabfield&amp;#039;=&amp;gt;array(&amp;quot;code,label&amp;quot;,&amp;quot;code,label&amp;quot;,&amp;quot;code,label&amp;quot;),																					// List of fields (result of select to show dictionary)&lt;br /&gt;
            &amp;#039;tabfieldvalue&amp;#039;=&amp;gt;array(&amp;quot;code,label&amp;quot;,&amp;quot;code,label&amp;quot;,&amp;quot;code,label&amp;quot;),																				// List of fields (list of fields to edit a record)&lt;br /&gt;
            &amp;#039;tabfieldinsert&amp;#039;=&amp;gt;array(&amp;quot;code,label&amp;quot;,&amp;quot;code,label&amp;quot;,&amp;quot;code,label&amp;quot;),																			// List of fields (list of fields for insert)&lt;br /&gt;
            &amp;#039;tabrowid&amp;#039;=&amp;gt;array(&amp;quot;rowid&amp;quot;,&amp;quot;rowid&amp;quot;,&amp;quot;rowid&amp;quot;),																									// Name of columns with primary key (try to always name it &amp;#039;rowid&amp;#039;)&lt;br /&gt;
            &amp;#039;tabcond&amp;#039;=&amp;gt;array($conf-&amp;gt;mymodule-&amp;gt;enabled,$conf-&amp;gt;mymodule-&amp;gt;enabled,$conf-&amp;gt;mymodule-&amp;gt;enabled)												// Condition to show each dictionary&lt;br /&gt;
        );&lt;br /&gt;
        */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        // Boxes/Widgets&lt;br /&gt;
		// Add here list of php file(s) stored in mymodule/core/boxes that contains class to show a widget.&lt;br /&gt;
        $this-&amp;gt;boxes = array(&lt;br /&gt;
        	0=&amp;gt;array(&amp;#039;file&amp;#039;=&amp;gt;&amp;#039;mymodulewidget1.php@mymodule&amp;#039;,&amp;#039;note&amp;#039;=&amp;gt;&amp;#039;Widget provided by MyModule&amp;#039;,&amp;#039;enabledbydefaulton&amp;#039;=&amp;gt;&amp;#039;Home&amp;#039;),&lt;br /&gt;
        	//1=&amp;gt;array(&amp;#039;file&amp;#039;=&amp;gt;&amp;#039;mymodulewidget2.php@mymodule&amp;#039;,&amp;#039;note&amp;#039;=&amp;gt;&amp;#039;Widget provided by MyModule&amp;#039;),&lt;br /&gt;
        	//2=&amp;gt;array(&amp;#039;file&amp;#039;=&amp;gt;&amp;#039;mymodulewidget3.php@mymodule&amp;#039;,&amp;#039;note&amp;#039;=&amp;gt;&amp;#039;Widget provided by MyModule&amp;#039;)&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		// Cronjobs (List of cron jobs entries to add when module is enabled)&lt;br /&gt;
		// unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week&lt;br /&gt;
		$this-&amp;gt;cronjobs = array(&lt;br /&gt;
			0=&amp;gt;array(&amp;#039;label&amp;#039;=&amp;gt;&amp;#039;MyJob label&amp;#039;, &amp;#039;jobtype&amp;#039;=&amp;gt;&amp;#039;method&amp;#039;, &amp;#039;class&amp;#039;=&amp;gt;&amp;#039;/mymodule/class/myobject.class.php&amp;#039;, &amp;#039;objectname&amp;#039;=&amp;gt;&amp;#039;MyObject&amp;#039;, &amp;#039;method&amp;#039;=&amp;gt;&amp;#039;doScheduledJob&amp;#039;, &amp;#039;parameters&amp;#039;=&amp;gt;&amp;#039;&amp;#039;, &amp;#039;comment&amp;#039;=&amp;gt;&amp;#039;Comment&amp;#039;, &amp;#039;frequency&amp;#039;=&amp;gt;2, &amp;#039;unitfrequency&amp;#039;=&amp;gt;3600, &amp;#039;status&amp;#039;=&amp;gt;0, &amp;#039;test&amp;#039;=&amp;gt;true)&lt;br /&gt;
		);&lt;br /&gt;
		// Example: $this-&amp;gt;cronjobs=array(0=&amp;gt;array(&amp;#039;label&amp;#039;=&amp;gt;&amp;#039;My label&amp;#039;, &amp;#039;jobtype&amp;#039;=&amp;gt;&amp;#039;method&amp;#039;, &amp;#039;class&amp;#039;=&amp;gt;&amp;#039;/dir/class/file.class.php&amp;#039;, &amp;#039;objectname&amp;#039;=&amp;gt;&amp;#039;MyClass&amp;#039;, &amp;#039;method&amp;#039;=&amp;gt;&amp;#039;myMethod&amp;#039;, &amp;#039;parameters&amp;#039;=&amp;gt;&amp;#039;param1, param2&amp;#039;, &amp;#039;comment&amp;#039;=&amp;gt;&amp;#039;Comment&amp;#039;, &amp;#039;frequency&amp;#039;=&amp;gt;2, &amp;#039;unitfrequency&amp;#039;=&amp;gt;3600, &amp;#039;status&amp;#039;=&amp;gt;0, &amp;#039;test&amp;#039;=&amp;gt;true),&lt;br /&gt;
		//                                1=&amp;gt;array(&amp;#039;label&amp;#039;=&amp;gt;&amp;#039;My label&amp;#039;, &amp;#039;jobtype&amp;#039;=&amp;gt;&amp;#039;command&amp;#039;, &amp;#039;command&amp;#039;=&amp;gt;&amp;#039;&amp;#039;, &amp;#039;parameters&amp;#039;=&amp;gt;&amp;#039;param1, param2&amp;#039;, &amp;#039;comment&amp;#039;=&amp;gt;&amp;#039;Comment&amp;#039;, &amp;#039;frequency&amp;#039;=&amp;gt;1, &amp;#039;unitfrequency&amp;#039;=&amp;gt;3600*24, &amp;#039;status&amp;#039;=&amp;gt;0, &amp;#039;test&amp;#039;=&amp;gt;true)&lt;br /&gt;
		// );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		// Permissions&lt;br /&gt;
		$this-&amp;gt;rights = array();		// Permission array used by this module&lt;br /&gt;
&lt;br /&gt;
		$r=0;&lt;br /&gt;
		$this-&amp;gt;rights[$r][0] = $this-&amp;gt;numero + $r;	// Permission id (must not be already used)&lt;br /&gt;
		$this-&amp;gt;rights[$r][1] = &amp;#039;Read myobject of MyModule&amp;#039;;	// Permission label&lt;br /&gt;
		$this-&amp;gt;rights[$r][3] = 1; 					// Permission by default for new user (0/1)&lt;br /&gt;
		$this-&amp;gt;rights[$r][4] = &amp;#039;read&amp;#039;;				// In php code, permission will be checked by test if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2)&lt;br /&gt;
		$this-&amp;gt;rights[$r][5] = &amp;#039;&amp;#039;;				    // In php code, permission will be checked by test if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2)&lt;br /&gt;
&lt;br /&gt;
		$r++;&lt;br /&gt;
		$this-&amp;gt;rights[$r][0] = $this-&amp;gt;numero + $r;	// Permission id (must not be already used)&lt;br /&gt;
		$this-&amp;gt;rights[$r][1] = &amp;#039;Create/Update myobject of MyModule&amp;#039;;	// Permission label&lt;br /&gt;
		$this-&amp;gt;rights[$r][3] = 1; 					// Permission by default for new user (0/1)&lt;br /&gt;
		$this-&amp;gt;rights[$r][4] = &amp;#039;write&amp;#039;;				// In php code, permission will be checked by test if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2)&lt;br /&gt;
		$this-&amp;gt;rights[$r][5] = &amp;#039;&amp;#039;;				    // In php code, permission will be checked by test if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2)&lt;br /&gt;
&lt;br /&gt;
		$r++;&lt;br /&gt;
		$this-&amp;gt;rights[$r][0] = $this-&amp;gt;numero + $r;	// Permission id (must not be already used)&lt;br /&gt;
		$this-&amp;gt;rights[$r][1] = &amp;#039;Delete myobject of MyModule&amp;#039;;	// Permission label&lt;br /&gt;
		$this-&amp;gt;rights[$r][3] = 1; 					// Permission by default for new user (0/1)&lt;br /&gt;
		$this-&amp;gt;rights[$r][4] = &amp;#039;delete&amp;#039;;				// In php code, permission will be checked by test if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2)&lt;br /&gt;
		$this-&amp;gt;rights[$r][5] = &amp;#039;&amp;#039;;				    // In php code, permission will be checked by test if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		// Main menu entries&lt;br /&gt;
		$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
		$r=0;&lt;br /&gt;
&lt;br /&gt;
		// Add here entries to declare new menus&lt;br /&gt;
&lt;br /&gt;
		/* BEGIN MODULEBUILDER TOPMENU */&lt;br /&gt;
		$this-&amp;gt;menu[$r++]=array(&amp;#039;fk_menu&amp;#039;=&amp;gt;&amp;#039;&amp;#039;,			                // &amp;#039;&amp;#039; if this is a top menu. For left menu, use &amp;#039;fk_mainmenu=xxx&amp;#039; or &amp;#039;fk_mainmenu=xxx,fk_leftmenu=yyy&amp;#039; where xxx is mainmenucode and yyy is a leftmenucode&lt;br /&gt;
								&amp;#039;type&amp;#039;=&amp;gt;&amp;#039;top&amp;#039;,			                // This is a Top menu entry&lt;br /&gt;
								&amp;#039;titre&amp;#039;=&amp;gt;&amp;#039;MyModule&amp;#039;,&lt;br /&gt;
								&amp;#039;mainmenu&amp;#039;=&amp;gt;&amp;#039;mymodule&amp;#039;,&lt;br /&gt;
								&amp;#039;leftmenu&amp;#039;=&amp;gt;&amp;#039;&amp;#039;,&lt;br /&gt;
								&amp;#039;url&amp;#039;=&amp;gt;&amp;#039;/mymodule/mymoduleindex.php&amp;#039;,&lt;br /&gt;
								&amp;#039;langs&amp;#039;=&amp;gt;&amp;#039;mymodule@mymodule&amp;#039;,	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
								&amp;#039;position&amp;#039;=&amp;gt;1000+$r,&lt;br /&gt;
								&amp;#039;enabled&amp;#039;=&amp;gt;&amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;,	// Define condition to show or hide menu entry. Use &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039; if entry must be visible if module is enabled.&lt;br /&gt;
								&amp;#039;perms&amp;#039;=&amp;gt;&amp;#039;1&amp;#039;,			                // Use &amp;#039;perms&amp;#039;=&amp;gt;&amp;#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&amp;#039; if you want your menu with a permission rules&lt;br /&gt;
								&amp;#039;target&amp;#039;=&amp;gt;&amp;#039;&amp;#039;,&lt;br /&gt;
								&amp;#039;user&amp;#039;=&amp;gt;2);				                // 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
&lt;br /&gt;
		/* END MODULEBUILDER TOPMENU */&lt;br /&gt;
&lt;br /&gt;
		/* BEGIN MODULEBUILDER LEFTMENU MYOBJECT&lt;br /&gt;
		$this-&amp;gt;menu[$r++]=array(	&amp;#039;fk_menu&amp;#039;=&amp;gt;&amp;#039;fk_mainmenu=mymodule&amp;#039;,	    // &amp;#039;&amp;#039; if this is a top menu. For left menu, use &amp;#039;fk_mainmenu=xxx&amp;#039; or &amp;#039;fk_mainmenu=xxx,fk_leftmenu=yyy&amp;#039; where xxx is mainmenucode and yyy is a leftmenucode&lt;br /&gt;
								&amp;#039;type&amp;#039;=&amp;gt;&amp;#039;left&amp;#039;,			                // This is a Left menu entry&lt;br /&gt;
								&amp;#039;titre&amp;#039;=&amp;gt;&amp;#039;List MyObject&amp;#039;,&lt;br /&gt;
								&amp;#039;mainmenu&amp;#039;=&amp;gt;&amp;#039;mymodule&amp;#039;,&lt;br /&gt;
								&amp;#039;leftmenu&amp;#039;=&amp;gt;&amp;#039;mymodule_myobject_list&amp;#039;,&lt;br /&gt;
								&amp;#039;url&amp;#039;=&amp;gt;&amp;#039;/mymodule/myobject_list.php&amp;#039;,&lt;br /&gt;
								&amp;#039;langs&amp;#039;=&amp;gt;&amp;#039;mymodule@mymodule&amp;#039;,	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
								&amp;#039;position&amp;#039;=&amp;gt;1000+$r,&lt;br /&gt;
								&amp;#039;enabled&amp;#039;=&amp;gt;&amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;,  // Define condition to show or hide menu entry. Use &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039; if entry must be visible if module is enabled. Use &amp;#039;$leftmenu==\&amp;#039;system\&amp;#039;&amp;#039; to show if leftmenu system is selected.&lt;br /&gt;
								&amp;#039;perms&amp;#039;=&amp;gt;&amp;#039;1&amp;#039;,			                // Use &amp;#039;perms&amp;#039;=&amp;gt;&amp;#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&amp;#039; if you want your menu with a permission rules&lt;br /&gt;
								&amp;#039;target&amp;#039;=&amp;gt;&amp;#039;&amp;#039;,&lt;br /&gt;
								&amp;#039;user&amp;#039;=&amp;gt;2);				                // 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
		$this-&amp;gt;menu[$r++]=array(	&amp;#039;fk_menu&amp;#039;=&amp;gt;&amp;#039;fk_mainmenu=mymodule,fk_leftmenu=mymodule&amp;#039;,	    // &amp;#039;&amp;#039; if this is a top menu. For left menu, use &amp;#039;fk_mainmenu=xxx&amp;#039; or &amp;#039;fk_mainmenu=xxx,fk_leftmenu=yyy&amp;#039; where xxx is mainmenucode and yyy is a leftmenucode&lt;br /&gt;
								&amp;#039;type&amp;#039;=&amp;gt;&amp;#039;left&amp;#039;,			                // This is a Left menu entry&lt;br /&gt;
								&amp;#039;titre&amp;#039;=&amp;gt;&amp;#039;New MyObject&amp;#039;,&lt;br /&gt;
								&amp;#039;mainmenu&amp;#039;=&amp;gt;&amp;#039;mymodule&amp;#039;,&lt;br /&gt;
								&amp;#039;leftmenu&amp;#039;=&amp;gt;&amp;#039;mymodule_myobject_new&amp;#039;,&lt;br /&gt;
								&amp;#039;url&amp;#039;=&amp;gt;&amp;#039;/mymodule/myobject_page.php?action=create&amp;#039;,&lt;br /&gt;
								&amp;#039;langs&amp;#039;=&amp;gt;&amp;#039;mymodule@mymodule&amp;#039;,	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
								&amp;#039;position&amp;#039;=&amp;gt;1000+$r,&lt;br /&gt;
								&amp;#039;enabled&amp;#039;=&amp;gt;&amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;,  // Define condition to show or hide menu entry. Use &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039; if entry must be visible if module is enabled. Use &amp;#039;$leftmenu==\&amp;#039;system\&amp;#039;&amp;#039; to show if leftmenu system is selected.&lt;br /&gt;
								&amp;#039;perms&amp;#039;=&amp;gt;&amp;#039;1&amp;#039;,			                // Use &amp;#039;perms&amp;#039;=&amp;gt;&amp;#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&amp;#039; if you want your menu with a permission rules&lt;br /&gt;
								&amp;#039;target&amp;#039;=&amp;gt;&amp;#039;&amp;#039;,&lt;br /&gt;
								&amp;#039;user&amp;#039;=&amp;gt;2);				                // 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
		END MODULEBUILDER LEFTMENU MYOBJECT */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		// Exports&lt;br /&gt;
		$r=1;&lt;br /&gt;
&lt;br /&gt;
		/* BEGIN MODULEBUILDER EXPORT MYOBJECT */&lt;br /&gt;
		/*&lt;br /&gt;
		$langs-&amp;gt;load(&amp;quot;mymodule@mymodule&amp;quot;);&lt;br /&gt;
		$this-&amp;gt;export_code[$r]=$this-&amp;gt;rights_class.&amp;#039;_&amp;#039;.$r;&lt;br /&gt;
		$this-&amp;gt;export_label[$r]=&amp;#039;MyObjectLines&amp;#039;;	// Translation key (used only if key ExportDataset_xxx_z not found)&lt;br /&gt;
		$this-&amp;gt;export_icon[$r]=&amp;#039;myobject@mymodule&amp;#039;;&lt;br /&gt;
		$keyforclass = &amp;#039;MyObject&amp;#039;; $keyforclassfile=&amp;#039;/mymobule/class/myobject.class.php&amp;#039;; $keyforelement=&amp;#039;myobject&amp;#039;;&lt;br /&gt;
		include DOL_DOCUMENT_ROOT.&amp;#039;/core/commonfieldsinexport.inc.php&amp;#039;;&lt;br /&gt;
		$keyforselect=&amp;#039;myobject&amp;#039;; $keyforaliasextra=&amp;#039;extra&amp;#039;; $keyforelement=&amp;#039;myobject&amp;#039;;&lt;br /&gt;
		include DOL_DOCUMENT_ROOT.&amp;#039;/core/extrafieldsinexport.inc.php&amp;#039;;&lt;br /&gt;
		//$this-&amp;gt;export_dependencies_array[$r]=array(&amp;#039;mysubobject&amp;#039;=&amp;gt;&amp;#039;ts.rowid&amp;#039;, &amp;#039;t.myfield&amp;#039;=&amp;gt;array(&amp;#039;t.myfield2&amp;#039;,&amp;#039;t.myfield3&amp;#039;)); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)&lt;br /&gt;
		$this-&amp;gt;export_sql_start[$r]=&amp;#039;SELECT DISTINCT &amp;#039;;&lt;br /&gt;
		$this-&amp;gt;export_sql_end[$r]  =&amp;#039; FROM &amp;#039;.MAIN_DB_PREFIX.&amp;#039;myobject as t&amp;#039;;&lt;br /&gt;
		$this-&amp;gt;export_sql_end[$r] .=&amp;#039; WHERE 1 = 1&amp;#039;;&lt;br /&gt;
		$this-&amp;gt;export_sql_end[$r] .=&amp;#039; AND t.entity IN (&amp;#039;.getEntity(&amp;#039;myobject&amp;#039;).&amp;#039;)&amp;#039;;&lt;br /&gt;
		$r++; */&lt;br /&gt;
		/* END MODULEBUILDER EXPORT MYOBJECT */&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 *	Function called when module is enabled.&lt;br /&gt;
	 *	The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.&lt;br /&gt;
	 *	It also creates data directories&lt;br /&gt;
	 *&lt;br /&gt;
     *	@param      string	$options    Options when enabling module (&amp;#039;&amp;#039;, &amp;#039;noboxes&amp;#039;)&lt;br /&gt;
	 *	@return     int             	1 if OK, 0 if KO&lt;br /&gt;
	 */&lt;br /&gt;
	public function init($options=&amp;#039;&amp;#039;)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;_load_tables(&amp;#039;/mymodule/sql/&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
		// Create extrafields&lt;br /&gt;
		include_once DOL_DOCUMENT_ROOT.&amp;#039;/core/class/extrafields.class.php&amp;#039;;&lt;br /&gt;
		$extrafields = new ExtraFields($this-&amp;gt;db);&lt;br /&gt;
&lt;br /&gt;
		//$result1=$extrafields-&amp;gt;addExtraField(&amp;#039;myattr1&amp;#039;, &amp;quot;New Attr 1 label&amp;quot;, &amp;#039;boolean&amp;#039;, 1,  3, &amp;#039;thirdparty&amp;#039;,   0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, 1, &amp;#039;&amp;#039;, 0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;mymodule@mymodule&amp;#039;, &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;);&lt;br /&gt;
		//$result2=$extrafields-&amp;gt;addExtraField(&amp;#039;myattr2&amp;#039;, &amp;quot;New Attr 2 label&amp;quot;, &amp;#039;varchar&amp;#039;, 1, 10, &amp;#039;project&amp;#039;,      0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, 1, &amp;#039;&amp;#039;, 0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;mymodule@mymodule&amp;#039;, &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;);&lt;br /&gt;
		//$result3=$extrafields-&amp;gt;addExtraField(&amp;#039;myattr3&amp;#039;, &amp;quot;New Attr 3 label&amp;quot;, &amp;#039;varchar&amp;#039;, 1, 10, &amp;#039;bank_account&amp;#039;, 0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, 1, &amp;#039;&amp;#039;, 0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;mymodule@mymodule&amp;#039;, &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;);&lt;br /&gt;
		//$result4=$extrafields-&amp;gt;addExtraField(&amp;#039;myattr4&amp;#039;, &amp;quot;New Attr 4 label&amp;quot;, &amp;#039;select&amp;#039;,  1,  3, &amp;#039;thirdparty&amp;#039;,   0, 1, &amp;#039;&amp;#039;, array(&amp;#039;options&amp;#039;=&amp;gt;array(&amp;#039;code1&amp;#039;=&amp;gt;&amp;#039;Val1&amp;#039;,&amp;#039;code2&amp;#039;=&amp;gt;&amp;#039;Val2&amp;#039;,&amp;#039;code3&amp;#039;=&amp;gt;&amp;#039;Val3&amp;#039;)), 1 &amp;#039;&amp;#039;, 0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;mymodule@mymodule&amp;#039;, &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;);&lt;br /&gt;
		//$result5=$extrafields-&amp;gt;addExtraField(&amp;#039;myattr5&amp;#039;, &amp;quot;New Attr 5 label&amp;quot;, &amp;#039;text&amp;#039;,    1, 10, &amp;#039;user&amp;#039;,         0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, 1, &amp;#039;&amp;#039;, 0, 0, &amp;#039;&amp;#039;, &amp;#039;&amp;#039;, &amp;#039;mymodule@mymodule&amp;#039;, &amp;#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
		$sql = array();&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;_init($sql, $options);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 *	Function called when module is disabled.&lt;br /&gt;
	 *	Remove from database constants, boxes and permissions from Dolibarr database.&lt;br /&gt;
	 *	Data directories are not deleted&lt;br /&gt;
	 *&lt;br /&gt;
	 *	@param      string	$options    Options when enabling module (&amp;#039;&amp;#039;, &amp;#039;noboxes&amp;#039;)&lt;br /&gt;
	 *	@return     int             	1 if OK, 0 if KO&lt;br /&gt;
	 */&lt;br /&gt;
	public function remove($options = &amp;#039;&amp;#039;)&lt;br /&gt;
	{&lt;br /&gt;
		$sql = array();&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;_remove($sql, $options);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>R.ivnun</name></author>
	</entry>
</feed>