30include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/quickmemo/class/memo.class.php';
52 $this->numero = 141916;
55 $this->rights_class =
'quickmemo';
59 $this->family =
"technic";
62 $this->module_position =
'90';
67 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
70 $langs->load(
"quickmemo");
73 $this->
description = $langs->trans(
"ModuleQuickMemoDesc");
75 $this->descriptionlong = $langs->trans(
"ModuleQuickMemoDesc");
78 $this->editor_squarred_logo =
'';
81 $this->version =
'experimental';
86 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
92 $this->picto =
'fa-sticky-note_far_#9bdb07';
96 $compatibleHooks = [];
97 foreach ($contextTabMapping as $values) {
98 foreach ((array) $values as $value) {
99 $compatibleHooks[] = (
string) $value;
102 $compatibleHooks = array_unique($compatibleHooks);
104 $compatibleHooks = array_filter($compatibleHooks,
static function (
string $k) {
105 return preg_match(
'/^[a-zA-Z0-9_]+$/', $k);
109 $this->module_parts = array(
115 'substitutions' => 0,
138 'hooks' => $compatibleHooks,
141 'moduleforexternal' => 0,
143 'websitetemplates' => 0,
150 $this->dirs = array(
"");
153 $this->config_page_url = array(
"setup.php@quickmemo");
159 $this->depends = array();
161 $this->requiredby = array();
163 $this->conflictwith = array();
166 $this->langfiles = array(
"quickmemo@quickmemo");
169 $this->phpmin = array(7, 2);
171 $this->need_dolibarr_version = array(19, -3);
173 $this->need_javascript_ajax = 0;
176 $this->warnings_activation = array();
177 $this->warnings_activation_ext = array();
186 $this->
const = array();
196 $conf->quickmemo->enabled = 0;
203 $this->tabs = array();
263 $this->dictionaries = array();
269 $this->boxes = array(
282 $this->cronjobs = array(
305 $this->rights = array();
310 $this->rights[$r][0] = $this->numero . sprintf(
"%02d", ($o * 10) + 1);
311 $this->rights[$r][1] =
'Read objects of QuickMemo';
312 $this->rights[$r][4] =
'memo';
313 $this->rights[$r][5] =
'read';
315 $this->rights[$r][0] = $this->numero . sprintf(
"%02d", ($o * 10) + 2);
316 $this->rights[$r][1] =
'Create/Update objects of QuickMemo';
317 $this->rights[$r][4] =
'memo';
318 $this->rights[$r][5] =
'write';
320 $this->rights[$r][0] = $this->numero . sprintf(
"%02d", ($o * 10) + 3);
321 $this->rights[$r][1] =
'Delete objects of QuickMemo';
322 $this->rights[$r][4] =
'memo';
323 $this->rights[$r][5] =
'delete';
328 $this->menu = array();
332 $this->menu[$r++] = array(
333 'fk_menu' =>
'fk_mainmenu=tools',
336 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth valignmiddle"'),
337 'mainmenu' =>
'tools',
338 'leftmenu' =>
'memo',
339 'url' =>
'/quickmemo/memo_list.php',
340 'langs' =>
'quickmemo',
341 'position' => 1000 + $r,
342 'enabled' =>
'isModEnabled("quickmemo")',
348 $this->menu[$r++] = array(
349 'fk_menu' =>
'fk_mainmenu=tools,fk_leftmenu=memo',
351 'titre' =>
'List Memo',
352 'mainmenu' =>
'tools',
353 'leftmenu' =>
'quickmemo_memo_list',
354 'url' =>
'/quickmemo/memo_list.php',
355 'langs' =>
'quickmemo',
356 'position' => 1000 + $r,
357 'enabled' =>
'isModEnabled("quickmemo")',
373 public function init($options =
'')
377 $result = $this->
_load_tables(
'/install/mysql/',
'quickmemo');
393 $this->
remove($options);
397 return $this->
_init($sql, $options);
408 public function remove($options =
'')
411 return $this->
_remove($sql, $options);
_init($array_sql, $options='')
Enables a module.
_remove($array_sql, $options='')
Disable function.
_load_tables($reldir, $onlywithsuffix='')
Create tables and keys required by module:
static getAvailableMemoContextMapping($object=null, $onlyActiveModules=true)
Get available memo context.
Description and activation class for module QuickMemo.
init($options='')
Function called when module is enabled.
__construct($db)
Constructor.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
isModEnabled($module)
Is Dolibarr module enabled.
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
$conf db name
Only used if Module[ID]Name translation string is not found.