Clean code

This commit is contained in:
Laurent Destailleur 2022-06-30 04:26:21 +02:00
parent 07aebba254
commit 8f7ec29ccc
3 changed files with 10 additions and 3 deletions

View File

@ -2280,6 +2280,13 @@ if ($module == 'initmodule') {
}
print '</td></tr>';
print '<tr><td>';
print $langs->trans("Picto");
print '</td><td>';
print $moduleobj->picto;
print ' &nbsp; '.img_picto('', $moduleobj->picto, 'class="valignmiddle pictomodule paddingrightonly"');
print '</td></tr>';
print '<tr><td>';
print $langs->trans("Description");
print '</td><td>';

View File

@ -59,9 +59,9 @@ class MyObject extends CommonObject
public $isextrafieldmanaged = 1;
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
* @var string String with name of icon for myobject. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'myobject@mymodule' if picto is file 'img/object_myobject.png'.
*/
public $picto = 'myobject@mymodule';
public $picto = 'fa-file';
const STATUS_DRAFT = 0;

View File

@ -97,7 +97,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', __FILE__); // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$mode = GETPOST('mode', 'aZ');