mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Code comment
This commit is contained in:
@@ -11062,12 +11062,17 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
/**
|
||||
* Function dolGetButtonAction
|
||||
*
|
||||
* @param string $label Label or tooltip of button. Also used as tooltip in title attribute. Can be escaped HTML content or full simple text.
|
||||
* @param string $text Optional : short label on button. Can be escaped HTML content or full simple text.
|
||||
* @param string $actionType 'default', 'delete', 'danger', 'email', ...
|
||||
* @param string|array $url Url for link or array of subbutton description
|
||||
* @param string $id Attribute id of button
|
||||
* @param int|boolean $userRight User action right
|
||||
* @param string $label Label or tooltip of button. Also used as tooltip in title attribute. Can be escaped HTML content or full simple text.
|
||||
* @param string $text Optional : short label on button. Can be escaped HTML content or full simple text.
|
||||
* @param string $actionType 'default', 'delete', 'danger', 'email', ...
|
||||
* @param string|array $url Url for link or array of subbutton description
|
||||
* Example when an array is used: $arrayforbutaction = array(
|
||||
* 10 => array('lang'=>'propal', 'enabled'=>isModEnabled("propal"), 'perm'=>$user->hasRight('propal', 'creer'), 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid),
|
||||
* 20 => array('lang'=>'orders', 'enabled'=>isModEnabled("commande"), 'perm'=>$user->hasRight('commande', 'creer'), 'label' => 'CreateOrder', 'url'=>'/commande/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid),
|
||||
* 30 => array('lang'=>'bills', 'enabled'=>isModEnabled("facture"), 'perm'=>$user->hasRight('facture', 'creer'), 'label' => 'CreateBill', 'url'=>'/compta/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid),
|
||||
* );
|
||||
* @param string $id Attribute id of button
|
||||
* @param int|boolean $userRight User action right
|
||||
* // phpcs:disable
|
||||
* @param array $params = [ // Various params for future : recommended rather than adding more function arguments
|
||||
* 'attr' => [ // to add or override button attributes
|
||||
|
||||
Reference in New Issue
Block a user