36 global $langs, $conf, $user;
39 $langs->loadLangs(array(
'categories',
'products'));
44 $head[$h][0] = DOL_URL_ROOT.
'/categories/viewcat.php?id='.
$object->id.
'&type='.$type;
45 $head[$h][1] = $langs->trans(
"Category");
46 $head[$h][2] =
'card';
49 $head[$h][0] = DOL_URL_ROOT.
'/categories/photos.php?id='.
$object->id.
'&type='.$type;
50 $head[$h][1] = $langs->trans(
"Photos");
51 $head[$h][2] =
'photos';
55 $head[$h][0] = DOL_URL_ROOT.
'/categories/traduction.php?id='.
$object->id.
'&type='.$type;
56 $head[$h][1] = $langs->trans(
"Translation");
57 $nbTranslations = (!is_null(
$object->multilangs) && is_countable(
$object->multilangs)) ? count(
$object->multilangs) : 0;
58 if ($nbTranslations > 0) {
59 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbTranslations.
'</span>';
61 $head[$h][2] =
'translation';
65 $head[$h][0] = DOL_URL_ROOT.
'/categories/info.php?id='.
$object->id.
'&type='.$type;
66 $head[$h][1] = $langs->trans(
"Info");
67 $head[$h][2] =
'info';
89 global $langs, $conf, $user, $db;
92 $extrafields->fetch_name_optionals_label(
'categorie');
94 $langs->load(
"categories");
99 $head[$h][0] = DOL_URL_ROOT.
'/categories/admin/categorie.php';
100 $head[$h][1] = $langs->trans(
"Setup");
101 $head[$h][2] =
'setup';
104 $head[$h][0] = DOL_URL_ROOT.
'/categories/admin/categorie_extrafields.php';
105 $head[$h][1] = $langs->trans(
"ExtraFieldsCategories");
106 $nbExtrafields = $extrafields->attributes[
'categorie'][
'count'];
107 if ($nbExtrafields > 0) {
108 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
110 $head[$h][2] =
'attributes_categories';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
categories_prepare_head(Categorie $object, $type)
Prepare array with list of tabs.
categoriesadmin_prepare_head()
Prepare array with list of tabs.
Class to manage categories.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).