NEW : Add option position['find'] to DolEditor (#29546)

* Add option position['find'] to DolEditor

* Add option position['find'] to DolEditor - fix spaces

* Add option position['find'] to DolEditor - fix spaces

* Add option position['find'] to DolEditor - fix semi-colon

* Add option position['find'] to DolEditor - exemples -> examples...

* Add option position['find'] to DolEditor - reviews

* Add option position['find'] to DolEditor - empty indent

---------

Co-authored-by: Vaadasch <me@local.here>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Vaadasch
2024-05-01 18:04:18 +02:00
committed by GitHub
parent 3db55abdb9
commit 5865151eb3
3 changed files with 55 additions and 23 deletions

View File

@@ -64,6 +64,7 @@ class modMyModule extends DolibarrModules
// Module label (no space allowed), used if translation string 'ModuleMyModuleName' not found (MyModule is name of module).
$this->name = preg_replace('/^mod/i', '', get_class($this));
// DESCRIPTION_FLAG
// Module description, used if translation string 'ModuleMyModuleDesc' not found (MyModule is name of module).
$this->description = "MyModuleDescription";
// Used only if file README.md and README-LL.md not found.
@@ -117,6 +118,7 @@ class modMyModule extends DolibarrModules
// '/mymodule/js/mymodule.js.php',
),
// Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all'
/* BEGIN MODULEBUILDER HOOKSCONTEXTS */
'hooks' => array(
// 'data' => array(
// 'hookcontext1',
@@ -124,6 +126,7 @@ class modMyModule extends DolibarrModules
// ),
// 'entity' => '0',
),
/* END MODULEBUILDER HOOKSCONTEXTS */
// Set this to 1 if features of module are opened to external users
'moduleforexternal' => 0,
// Set this to 1 if the module provides a website template into doctemplates/websites/website_template-mytemplate
@@ -180,7 +183,9 @@ class modMyModule extends DolibarrModules
}
// Array to add new pages in new tabs
/* BEGIN MODULEBUILDER TABS */
$this->tabs = array();
/* END MODULEBUILDER TABS */
// Example:
// To add a new tab identified by code tabname1
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@mymodule:$user->hasRight('mymodule', 'read'):/mymodule/mynewtab1.php?id=__ID__');
@@ -210,6 +215,7 @@ class modMyModule extends DolibarrModules
// 'thirdparty' to add a tab in third party view
// 'user' to add a tab in user view
// Dictionaries
/* Example:
$this->dictionaries=array(
@@ -303,12 +309,11 @@ class modMyModule extends DolibarrModules
*/
/* END MODULEBUILDER PERMISSIONS */
// Main menu entries to add
$this->menu = array();
$r = 0;
// Add here entries to declare new menus
/* BEGIN MODULEBUILDER TOPMENU */
$this->menu[$r++] = array(
'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode