stocktransfer.lib.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /* Copyright (C) 2021 SuperAdmin
  3. * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file stocktransfer/lib/stocktransfer.lib.php
  20. * \ingroup stocktransfer
  21. * \brief Library files with common functions for StockTransfer
  22. */
  23. /**
  24. * Prepare admin pages header
  25. *
  26. * @return array
  27. */
  28. function stocktransferAdminPrepareHead()
  29. {
  30. global $langs, $conf;
  31. $langs->load("stocks");
  32. $h = 0;
  33. $head = array();
  34. $head[$h][0] = dol_buildpath("/admin/stocktransfer.php", 1);
  35. $head[$h][1] = $langs->trans("Settings");
  36. $head[$h][2] = 'settings';
  37. $h++;
  38. /*
  39. $head[$h][0] = dol_buildpath("/stocktransfer/admin/myobject_extrafields.php", 1);
  40. $head[$h][1] = $langs->trans("ExtraFields");
  41. $head[$h][2] = 'myobject_extrafields';
  42. $h++;
  43. */
  44. /*$head[$h][0] = dol_buildpath("/product/stock/stocktransfer/admin/about.php", 1);
  45. $head[$h][1] = $langs->trans("About");
  46. $head[$h][2] = 'about';
  47. $h++;*/
  48. // Show more tabs from modules
  49. // Entries must be declared in modules descriptor with line
  50. //$this->tabs = array(
  51. // 'entity:+tabname:Title:@stocktransfer:/stocktransfer/mypage.php?id=__ID__'
  52. //); // to add new tab
  53. //$this->tabs = array(
  54. // 'entity:-tabname:Title:@stocktransfer:/stocktransfer/mypage.php?id=__ID__'
  55. //); // to remove a tab
  56. complete_head_from_modules($conf, $langs, null, $head, $h, 'stocktransfer');
  57. complete_head_from_modules($conf, $langs, null, $head, $h, 'stocktransfer', 'remove');
  58. return $head;
  59. }