dolibarr 21.0.0-alpha
commonsignedobject.class.php File Reference

File of trait for common signed business objects (contracts, interventions, ...) More...

Go to the source code of this file.

Functions

 getSignedStatusLocalisedArray ()
 Returns an array of signed statuses with associated localized labels.
 
 setSignedStatus (User $user, int $status=0, int $notrigger=0, string $triggercode='')
 Set signed status & object context.
 
 setSignedStatusCommon (User $user, int $status, int $notrigger=0, string $triggercode='')
 Set signed status & call trigger with context message.
 
 getLibSignedStatus (int $mode=0)
 Returns the label for signed status.
 

Detailed Description

File of trait for common signed business objects (contracts, interventions, ...)

Definition in file commonsignedobject.class.php.

Function Documentation

◆ getLibSignedStatus()

getLibSignedStatus ( int $mode = 0)

Returns the label for signed status.

Parameters
int$mode0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
Returns
string Label

Definition at line 177 of file commonsignedobject.class.php.

References getSignedStatusLocalisedArray().

Referenced by Expedition\LibStatut(), and Fichinter\LibStatut().

◆ getSignedStatusLocalisedArray()

getSignedStatusLocalisedArray ( )

Returns an array of signed statuses with associated localized labels.

Returns
array<string>

Definition at line 60 of file commonsignedobject.class.php.

Referenced by getLibSignedStatus().

◆ setSignedStatus()

setSignedStatus ( User $user,
int $status = 0,
int $notrigger = 0,
string $triggercode = '' )

Set signed status & object context.

Call sign action trigger.

Parameters
User$userObject user that modify
int$statusNew signed status to set (often a constant like self\STATUS_XXX)
int$notrigger1 = Does not execute triggers, 0 = Execute triggers
string$triggercodeTrigger code to use
Returns
int 0 < if KO, > 0 if OK

Definition at line 89 of file commonsignedobject.class.php.

References setSignedStatusCommon().

◆ setSignedStatusCommon()

setSignedStatusCommon ( User $user,
int $status,
int $notrigger = 0,
string $triggercode = '' )

Set signed status & call trigger with context message.

Parameters
User$userObject user that modify
int$statusNew signed status to set (often a constant like self\STATUS_XXX)
int$notrigger1 = Does not execute triggers, 0 = Execute triggers
string$triggercodeTrigger code to use
Returns
int 0 < if KO, > 0 if OK

Definition at line 124 of file commonsignedobject.class.php.

References setEventMessages().

Referenced by Commande\setSignedStatus(), and setSignedStatus().