dolibarr 19.0.3
|
Class to manage standard extra languages. More...
Public Member Functions | |
__construct ($db) | |
Constructor. | |
fetch_name_extralanguages ($elementtype, $forceload=false) | |
Load array this->attributes with list of fields per object that need an alternate translation. | |
showInputField ($key, $value, $extrafieldsobjectkey, $moreparam='', $keysuffix='', $keyprefix='', $morecss='', $objectid=0, $mode=0) | |
Return HTML string to put an input field into a page Code very similar with showInputField of common object. | |
showOutputField ($key, $value, $extrafieldsobjectkey, $moreparam='') | |
Return HTML string to put an output field into a page. | |
Class to manage standard extra languages.
Definition at line 28 of file extralanguages.class.php.
ExtraLanguages::__construct | ( | $db | ) |
Constructor.
Definition at line 61 of file extralanguages.class.php.
ExtraLanguages::fetch_name_extralanguages | ( | $elementtype, | |
$forceload = false ) |
Load array this->attributes with list of fields per object that need an alternate translation.
The object and field must be managed with the widgetForTranslation() method. You must set variable MAIN_USE_ALTERNATE_TRANSLATION_FOR=elementA:fieldname,fieldname2;elementB:... Example: MAIN_USE_ALTERNATE_TRANSLATION_FOR=societe:name,town;contact:firstname,lastname
string | $elementtype | Type of element ('' = all, 'adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...). |
boolean | $forceload | Force load of extra fields whatever is status of cache. |
Definition at line 81 of file extralanguages.class.php.
References getDolGlobalString().
ExtraLanguages::showInputField | ( | $key, | |
$value, | |||
$extrafieldsobjectkey, | |||
$moreparam = '', | |||
$keysuffix = '', | |||
$keyprefix = '', | |||
$morecss = '', | |||
$objectid = 0, | |||
$mode = 0 ) |
Return HTML string to put an input field into a page Code very similar with showInputField of common object.
string | $key | Key of attribute |
string | $value | Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value) |
string | $extrafieldsobjectkey | If defined (for example $object->table_element), use the new method to get extrafields data |
string | $moreparam | To add more parametes on html input tag |
string | $keysuffix | Prefix string to add after name and id of field (can be used to avoid duplicate names) |
string | $keyprefix | Suffix string to add before name and id of field (can be used to avoid duplicate names) |
string | $morecss | More css (to defined size of field. Old behaviour: may also be a numeric) |
int | $objectid | Current object id |
int | $mode | 1=Used for search filters |
Definition at line 140 of file extralanguages.class.php.
ExtraLanguages::showOutputField | ( | $key, | |
$value, | |||
$extrafieldsobjectkey, | |||
$moreparam = '' ) |
Return HTML string to put an output field into a page.
string | $key | Key of attribute |
string | $value | Value to show |
string | $extrafieldsobjectkey | If defined (for example $object->table_element), function uses the new method to get extrafields data |
string | $moreparam | To add more parameters on html input tag (only checkbox use html input for output rendering) |
Definition at line 168 of file extralanguages.class.php.