mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
add dolBuildUrl with examples of use (#35549)
* add dol_buildurl with examples of use * add dol_buildurl with examples of use * add dol_buildurl with examples of use * add dol_buildurl with examples of use * wip * wip * add more example * add more example * add more example * add more example * add more example * add more example * add more example * add example * add example * add example * add example * add example * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * stay in the same area even we are on other area in other tab * clean code * clean code * clean code * clean code * clean code * clean code * clean code * add example * add example * add example * add example * add example * add example add example add example add example add example * add example * add example add example add example add example * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * fix * wip * wip * clean code
This commit is contained in:
@@ -42,13 +42,13 @@ function myobjectPrepareHead($object)
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = dol_buildpath("/mymodule/myobject_card.php", 1).'?id='.$object->id;
|
||||
$head[$h][0] = dolBuildUrl(dol_buildpath("/mymodule/myobject_card.php", 1), ['id' => $object->id]);
|
||||
$head[$h][1] = $langs->trans("MyObject");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
if ($showtabofpagecontact) {
|
||||
$head[$h][0] = dol_buildpath("/mymodule/myobject_contact.php", 1).'?id='.$object->id;
|
||||
$head[$h][0] = dolBuildUrl(dol_buildpath("/mymodule/myobject_contact.php", 1), ['id' => $object->id]);
|
||||
$head[$h][1] = $langs->trans("Contacts");
|
||||
$head[$h][2] = 'contact';
|
||||
$h++;
|
||||
@@ -63,7 +63,7 @@ function myobjectPrepareHead($object)
|
||||
if (!empty($object->note_public)) {
|
||||
$nbNote++;
|
||||
}
|
||||
$head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id;
|
||||
$head[$h][0] = dolBuildUrl(dol_buildpath('/mymodule/myobject_note.php', 1), ['id' => $object->id]);
|
||||
$head[$h][1] = $langs->trans('Notes');
|
||||
if ($nbNote > 0) {
|
||||
$head[$h][1] .= (!getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
|
||||
@@ -79,7 +79,7 @@ function myobjectPrepareHead($object)
|
||||
$upload_dir = $conf->mymodule->dir_output."/myobject/".dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||
$nbLinks = Link::count($db, $object->element, $object->id);
|
||||
$head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id;
|
||||
$head[$h][0] = dolBuildUrl(dol_buildpath("/mymodule/myobject_document.php", 1), ['id' => $object->id]);
|
||||
$head[$h][1] = $langs->trans('Documents');
|
||||
if (($nbFiles + $nbLinks) > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
|
||||
@@ -89,7 +89,7 @@ function myobjectPrepareHead($object)
|
||||
}
|
||||
|
||||
if ($showtabofpageagenda) {
|
||||
$head[$h][0] = dol_buildpath("/mymodule/myobject_agenda.php", 1).'?id='.$object->id;
|
||||
$head[$h][0] = dolBuildUrl(dol_buildpath("/mymodule/myobject_agenda.php", 1), ['id' => $object->id]);
|
||||
$head[$h][1] = $langs->trans("Events");
|
||||
$head[$h][2] = 'agenda';
|
||||
$h++;
|
||||
|
||||
Reference in New Issue
Block a user